pytest测试报告错误提示pytest: error: unrecognized arguments: --html=report.html --self-contained-html


今天练习pytest的时候在命令行中运行生成测试报告的命令的时候出现了

 

pytest: error: unrecognized arguments: --html=report.html --self-contained-html

 

百度后:

 

pytest生成报告需要pytest -html库文件,所以本地需要安装此库

cmd下安装库文件:

pip install pytest-html

 

 

解决后重新运行

 

pytest cases --html=report.html --self-contained-html



成功!

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM