开发者

Why weren't certain Python files examined by coverage.py?

I'm using coverage.py to measure test coverage in a Python project, but some Python files are no开发者_JAVA百科t showing up in the coverage report. One thing that is different about these files is that they were not executed by any tests (i.e., if they were included in the report, their coverage would be 0%).

What are possible reasons why these files were not examined? If it's because they were never loaded during unit testing, is it possible to force coverage.py to include these files in the report?


If your files are even not loaded during your testing session, they won't even appear in coverage result. But you can force coverage.py to measure "non" coverage in every file you want with the source option. It will include even non loaded source code to the coverage report.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜