Python NoTests——覆盖html不会生成html文档

Python NoTests——覆盖html不会生成html文档,python,nosetests,code-coverage,Python,Nosetests,Code Coverage,我已经为Python2.6安装了nose,它工作正常,但我尝试使用--cover html选项来生成html报告。我从命令行键入了以下命令: nosetests --cover-html 它运行了测试,但没有生成html 我遗漏了什么吗?您还需要--with coverage选项来首先启用覆盖插件。这是老消息,但选项的顺序很重要: nosetests --with-coverage --cover-erase --cover-html-dir=C:/temp/res --cover-html

我已经为Python2.6安装了nose,它工作正常,但我尝试使用
--cover html
选项来生成html报告。我从命令行键入了以下命令:

nosetests --cover-html
它运行了测试,但没有生成html


我遗漏了什么吗?

您还需要
--with coverage
选项来首先启用覆盖插件。

这是老消息,但选项的顺序很重要:

nosetests --with-coverage --cover-erase --cover-html-dir=C:/temp/res --cover-html test.py

上面的命令与
nosetests test.py——不使用html的情况下有什么区别?!我没有看到任何带有html的选项是nosetests。我想您指的是另一个名为nose-htmloutput的python包。我不知道。