Question

We are using Hudson and coverage.py to report the code coverage of our test suite. Hudson breaks down coverage into:

  • packages
  • files
  • classes
  • lines
  • conditionals

Coverage.py only reports coverage on files executed/imported during the tests, and so it seems is oblivious to any files not executed during the tests. Is there ever an instance where files would not report 100% coverage?

Was it helpful?

Solution

Currently, coverage.py doesn't know how to find files that are never executed and report them as not covered, but that will be coming in the next release. So now, the file coverage will always be 100%. This is an area where Hudson (using the Cobertura plugin) and coverage.py don't mesh very well.

OTHER TIPS

Coverage.py now (as of 3.4) does let you find completely unexecuted files. See the docs for details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top