[SciPy-dev] [OT] Skipping whole modules in nose test discovery

Neil Martinsen-Burrell nmb@wartburg....
Tue Nov 24 16:12:41 CST 2009


On 2009-11-24 15:24 , Gael Varoquaux wrote:
> Hi there,
>
> this is off topic, but as they are some extensive users of nose, I am
> piggy backing on my list subscription.
>
> I have a package using autosummary, with a copy of autosummary in the
> package itself. I am also testing that package with nose. My problem is
> that, on systems where docutils is not installed, I get import errors
> when nose tries to import the autosummary file to inspect it at test
> discovery time. Any way I can tell nose not to inspect that file?

 From nosetests --help:

[...]

   -e REGEX, --exclude=REGEX
                         Don't run tests that match regular expression
                         [NOSE_EXCLUDE]

[...]

or programmatically, it appears that 
nose.run(env={'NOSE_EXCLUDE':'autosummary'}) should do the same thing.

-Neil


More information about the SciPy-Dev mailing list