[TIP] override setup.cfg values in nosetests

Brad Allen bradallen137 at gmail.com
Fri May 28 14:56:51 PDT 2010


Hi,

I'm looking for a way when running nosetests to override the values in
the config file using command line arguments. After digging in the
docs, and looking at nosetests --help, I couldn't find anything
obvious discussing this.

I have a setup.cfg which contains the following:

[nosetests]
tests = tests

This causes nose to find all my tests, which is great most of the
time, but annoying when I want to specify a subdirectory or an
individual test module. For example, when I run the command "nosetests
tests/somedir", nose runs all the tests, not just the ones under
tests/somedir.

Is there any command line flag to override this (other than '-c' to
specify a different config file)?

Thanks, and sorry if I missed something in the docs somewhere.



More information about the testing-in-python mailing list