我如何知道执行了哪些 python 个源文件?

How can I tell which python source files are executed?

我的一个测试失败了。虽然我有大量的源文件,但我知道我 运行 测试时只用到其中的几个。

如何确定测试中使用了哪些文件?

生成完整的覆盖率报告。参见 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