Python自动化测试代码覆盖率

1.安装coverage库

pip install coverage

2. 运行coverage

coverage rune --source=. -m unittest discover

 3.生成report

coverage report -m

 

pip install coverage
posted @ 2024-07-11 14:12  蜗牛果果  阅读(7)  评论(0编辑  收藏  举报