coverage python 代码覆盖率工具使用(django 使用) 1. 安装包 pip install coverage 2.启动程序 coverage run -m pytest 3.获取html格式的报告文件 coverage html 4.创建配置文件 .coveragerc