我正在使用nosetests自动发现并运行我的unittests。我还想让它生成覆盖报告。
当我用下面的命令运行nosetests时,一切正常
nosetests .
我在网上查到,为了生成覆盖率,nosetests有一个命令行参数--with-coverage
。我还使用nosetests --help
检查了该命令是否存在。但是,每当我运行以下命令时,我会得到以下输出
nosetests --with-coverage .
Usage: nosetests [options]
nosetests: error: no such option: --with-coverage
我通过运行
nosetests --plugins
覆盖率和其他插件一起出现在列表中。
我还知道我已经安装了coverage,因为我可以使用以下内容手动运行coverage数据收集:
coverage run test.py
我是不是误用了保险范围选项?还是我还缺什么?
提前谢谢。
目前没有回答
相关问题 更多 >
编程相关推荐