nose-devs/nose — Issue #113: config.ignoreFiles does not have a commandline option
Author: jpellerin
Created: 2011-12-14 15:59:40+00:00
State: open

config.ignoreFiles is set to ignore any files starting with '_' or '.', as well as 'setup.py'. However, I wanted to have all my test files start with an '_' to distinguish them from my normal modules. The defaults for ignoreFiles did not let me do that.

I have already added a new commandline option to resolve this. I don't have a place to stick a mercurial repository that I can make publicly available, so I am attaching the diff for config.py. If there is a better way definitely let me know.

The new option is '--exclude-files'. It takes a regex pattern, keeps the old defaults, and stores in 'config.ignoreFiles'. It checks 'NOSE_EXCLUDE_FILES' in the environment, and automatically turns it or the commandline option into a list (of one) of regular expressions. I tried to copy the functionality from the other similar options.

It is working fine for me with what I added. If you pass None for '--exclude-files' then it will not exclude any, which is good enough for me.

Google Code Info:
Issue #: 359
Author: esnowve...@gmail.com
Created On: 2010-08-03T16:22:52.000Z
Closed On: 2011-11-25T06:12:02.000Z