1. 安装包

pip install coverage

2.启动程序

coverage run -m pytest

3.获取html格式的报告文件

coverage html

4.创建配置文件 .coveragerc

 

相关文章: