2013-05-30 51 views
3

.nosercNosetests不读配置文件

[nosetests] 
with-xunit 

运行过程中出现使用下面的命令

nosetests -w ./test/unit_test 

当我运行使用nosetests它不会创建nosetests.xml文件测试中nosetest。 但是,如果我运行下面的命令,它会生成nosetests.xml文件。

nosetests -w ./test/unit_test --with-xunit 

不确定为什么当我运行nosetests时它不读取.noserc文件。

回答

1

将配置文件添加到主目录中有诀窍。

~/.noserc 
3

您可以有一个.noserc文件在用户的/ home目录,也可以将其姓名setup.cfg

+0

的文档是模糊的/不正确有关此下具有相同格式的文件在项目目录:http://nose.readthedocs.org/en/latest/usage.html:“你也可以将配置选项放在主目录中的.noserc或nose.cfg文件中。” – lsh