gpt4 book ai didi

python - 如何修复 Python Nose : Coverage not available: unable to import coverage module

转载 作者:IT老高 更新时间:2023-10-28 20:29:45 24 4
gpt4 key购买 nike

尽管安装了插件,但我似乎无法使用 Nose 获得代码覆盖率。

关于如何解决这个问题的任何想法?

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

最佳答案

您是否尝试过 pip 安装覆盖率?覆盖插件依赖单独的覆盖模块,不是 Nose 的依赖,需要手动安装。

关于python - 如何修复 Python Nose : Coverage not available: unable to import coverage module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14488601/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com