使用nostes的cfg文件中的插件出错

2024-09-20 22:53:54 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个包含以下行的文件:

suite = LazySuite(all_tests)
run(suite=suite, argv=['','-c', 'nose.cfg'] )

我有一个鼻子配置文件:

[nosetests]
stop=1
with-xunit=1
xunit-file=test.xml

当我运行testsuite时,会显示以下消息:

Usage: TestSuite1.py [options]

TestSuite1.py: error: Error reading config file 'nose.cfg': no such option 'with-xunit'

Process finished with exit code 2

我不知道发生了什么,因为如果我直接作为参数在cmd中执行xunit插件,那么脚本的执行就没有问题了。你知道吗

有什么建议吗?你知道吗


Tags: 文件runpywithtestsallcfgnose

热门问题