覆盖范围未显示 virtualenv 中执行的行
我有一个项目,我正在尝试运行覆盖范围的鼻子测试。 我正在虚拟环境中运行。 当我运行时,
$ python setup.py nosetests
测试运行良好,但覆盖范围没有显示执行任何代码(覆盖范围 都是 0%)。
Name Stmts Exec Cover Missing ------------------------------------------------------------------ package.module1 60 0 0% 3-106 package.module2 32 0 0% 3-93 package.module3 55 0 0% 8-74 package.module4 38 0 0% 3-125 package.module5 107 0 0% 8-123 package.module6 1 0 0% 1 package.module7 41 0 0% 3-143 package.module8 150 0 0% 7-281 package.module9 158 0 0% 3-338 ------------------------------------------------------------------ TOTAL 642 0 0% ---------------------------------------------------------------------- Ran 15 tests in 0.099s
覆盖版本3.0b3、Darwin内核版本9.7.0、Mac OS X 10.5.7、setuptools 0.6c9、 鼻子0.11.1,Python 2.5.4
I have a project and I am trying to run nosetests with coverage. I am running in a virtualenv.
When I run
$ python setup.py nosetests
The tests run fine but coverage is not showing that any code is executed (coverage
is all 0%).
Name Stmts Exec Cover Missing ------------------------------------------------------------------ package.module1 60 0 0% 3-106 package.module2 32 0 0% 3-93 package.module3 55 0 0% 8-74 package.module4 38 0 0% 3-125 package.module5 107 0 0% 8-123 package.module6 1 0 0% 1 package.module7 41 0 0% 3-143 package.module8 150 0 0% 7-281 package.module9 158 0 0% 3-338 ------------------------------------------------------------------ TOTAL 642 0 0% ---------------------------------------------------------------------- Ran 15 tests in 0.099s
Coverage version 3.0b3, Darwin Kernel Version 9.7.0, Mac OS X 10.5.7, setuptools 0.6c9,
nose 0.11.1, Python 2.5.4
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试...
我遇到了同样的问题,这解决了我的问题并为我提供了预期的光荣报道报告。
try...
I was having the same issue and this solved my problem and gave me glorious coverage reports as expected.