遇到问题–python–pytest: error: unrecognized arguments: --cov-report=html
生活随笔
收集整理的這篇文章主要介紹了
遇到问题–python–pytest: error: unrecognized arguments: --cov-report=html
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
轉(zhuǎn)載請注明出處:遇到問題–python–pytest: error: unrecognized arguments: --cov-report=html
問題
pytest可以輸出覆蓋率的html報告
使用命令如下:
pytest -vv --cov=./ --cov-report=html open htmlcov/index.html有可能遇到報錯:
(venv) zhangxiaofans-MacBook-Pro:mgap-mendel joe$ pytest --cov-report=html usage: pytest [options] [file_or_dir] [file_or_dir] [...] pytest: error: unrecognized arguments: --cov-report=htmlinifile: Nonerootdir: /Users/joe/workspace/platform/mgap-mendel/mgap-mendel原因
缺少pytest cov的包
解決方法
pip3 install pytest-cov轉(zhuǎn)載請注明出處:遇到問題–python–pytest: error: unrecognized arguments: --cov-report=html
總結(jié)
以上是生活随笔為你收集整理的遇到问题–python–pytest: error: unrecognized arguments: --cov-report=html的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python 小说人物分析_Python
- 下一篇: python学习--多值参数