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

Gael Varoquaux gael.varoquaux@normalesup....
Tue Nov 24 16:16:31 CST 2009

On Tue, Nov 24, 2009 at 04:12:41PM -0600, Neil Martinsen-Burrell wrote:
> 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.

Thanks, I thought too that this would do this do the trick too, but
apparently the module is still imported at discovery time.


More information about the SciPy-Dev mailing list