[英]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. 我想将
nosetests
首选的命令行选项放入文件中,以便它们与我的存储库一起使用。 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- 鼻子的文档中提到了“ .noserc或nose.cfg文件”,但是当我向其中一个添加以下内容时,没有任何变化-
[nosetests]
nocapture=1
verbosity=3
These are the equivalent of nosetests -vvv --nocapture
. 这些相当于
nosetests -vvv --nocapture
。
setup.cfg
is a third filename that nosetests
recognizes as a source for project-level command-line options. setup.cfg
是第三文件名nosetests
识别作为用于项目级命令行选项的源极。 nosetests
looks in the current folder for setup.cfg
, and .noserc
or nose.cfg
in your home directory. nosetests
看起来在当前文件夹setup.cfg
和.noserc
或nose.cfg
在你的home目录。
The docs " .noserc
or nose.cfg
" in the first paragraph, but doesn't mention setup.cfg
until deeper in the page. .noserc
的文档“ .noserc
或nose.cfg
”,但直到页面更深处才提及setup.cfg
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.