I can't seem to get code coverage with Nose to work, despite having the plugin installed.
虽然安装了这个插件,但我似乎无法使用Nose代码覆盖。
Any ideas on how to fix this?
有什么办法解决这个问题吗?
12:15:25 ~/sandbox/ec$ nosetests --plugins
Plugin xunit
Plugin deprecated
Plugin skip
Plugin multiprocess
Plugin failuredetail
Plugin capture
Plugin logcapture
Plugin coverage
Plugin attributeselector
Plugin doctest
Plugin profile
Plugin id
Plugin allmodules
Plugin collect-only
Plugin isolation
Plugin pdb
12:15:34 ~/sandbox/ec$ nosetests -v --with-coverage
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
tests.edgecast_client_tests.test_log ... ok
----------------------------------------------------------------------
Ran 1 test in 0.206s
OK
1 个解决方案
#1
80
Have you tried pip install coverage
? The coverage plugin depends on separate coverage module, which is not a nose's dependency, so needs to be installed manually.
你试过pip安装覆盖吗?覆盖率插件依赖于独立的覆盖率模块,这不是鼻子的依赖,所以需要手动安装。
#1
80
Have you tried pip install coverage
? The coverage plugin depends on separate coverage module, which is not a nose's dependency, so needs to be installed manually.
你试过pip安装覆盖吗?覆盖率插件依赖于独立的覆盖率模块,这不是鼻子的依赖,所以需要手动安装。