简体   繁体   中英

Can I put nosetests command-line options in a configuration file?

I'd like to put the command-line options I prefer for nosetests into a file, so they'll travel with my repo. The docs are unclear, at best, or maybe just wrong, about how this can be done.

nose's documentation mentions a ".noserc or nose.cfg file" but when I added the following to either of them, nothing changes-

[nosetests]
nocapture=1
verbosity=3

These are the equivalent of nosetests -vvv --nocapture .

setup.cfg is a third filename that nosetests recognizes as a source for project-level command-line options. nosetests looks in the current folder for setup.cfg , and .noserc or nose.cfg in your home directory.

The docs " .noserc or nose.cfg " in the first paragraph, but doesn't mention setup.cfg until deeper in the page.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM