python - Coverage 是否提供自己版本的 Nose 插件?

标签 python code-coverage nose

nose 版本 1.3.7 的文档指出

Newer versions of coverage contain their own nose plugin which is superior to the builtin plugin. It exposes more of coverage’s options and uses coverage’s native html output. Depending on the version of coverage installed, the included plugin may override the nose builtin plugin, or be available under a different name. Check nosetests --help or nosetests --plugins to find out which coverage plugin is available on your system.

运行nosetests --plugins --verbose 我可以看到我有插件“coverage”,其描述为“使用Ned Batchelder 的覆盖率模块激活覆盖率报告”。 对我来说,从这个描述中并不清楚我正在使用什么覆盖插件。

新的 Nose 插件在哪个版本的覆盖范围内可用?

我如何知道我是否正在使用它?

这样的插件真的存在吗?

今年(2016 年)5 月,Ned Batchelder 似乎建议使用 coverage -m nose ...,但没有在他们的 issue-trackerstackoverflow 中提及新插件。

最佳答案

Coverage从未提供过自己的nose插件。

请注意, Nose 不再被维护,如 nose documentation states :

Nose has been in maintenance mode for the past several years and will likely cease without a new person/team to take over maintainership. New projects should consider using Nose2, py.test, or just plain unittest/unittest2.

如果你必须使用 Nose ,我仍然建议使用遮盖来润鼻:

coverage run -m nose ....

关于python - Coverage 是否提供自己版本的 Nose 插件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39290927/

相关文章:

python - Nose:如何默认跳过测试?

python - 如何使用 Zeep 和 Python 3.7 捕获错误

python - 将 pandas 数据框嵌套列表拆分为新的命名列

python - 将覆盖率和 codecov.io 与 pytest 单元测试和定制内联测试结合使用

gcc - lcov/genhtml 可以显示从未执行过的文件吗?

testing - hudson / Jenkins : Buckminster emma: How to exclude packages

python - 用列表中的子字符串替换 Pandas 列中的字符串

python - melt pandas df 其中变量名是那个单元格的(行名+列名)

python - 如何在pytest中抑制第三方日志

python - 如果发生错误,nosetests 重新启动测试