如何判断执行哪些python源文件?

时间:2016-11-09 03:43:23

标签: python testing code-coverage

我的一项测试失败了。虽然我有大量的源文件,但我知道在运行测试时只使用了少量文件。

如何确定测试中使用的文件?

1 个答案:

答案 0 :(得分:0)

生成完整覆盖率报告。见https://coverage.readthedocs.io/en/coverage-4.2/

sudo pip install coverage
coverage run test.py test1
coverage html
gnome-www-browser htmlcov/index.html
相关问题