I'd like to run "nosetests --with-coverage" using Ned Batchelder's coverage module, but passing the coverage module the --timid flag. Is there a way (e.g. setting an environment variable) to make coverage run with --timid?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You've got two options:
Use a .coveragerc file to provide options to coverage.py
Instead of running coverage inside nose, run nose inside coverage:
coverage run c:\python25\scripts\nosetests-script.py
(sorry for the Windows syntax if you aren't on Windows)