Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When would my Python test suite file coverage not be 100%?

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?

like image 400
Pete Avatar asked Aug 25 '10 03:08

Pete


1 Answers

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.

like image 162
Ned Batchelder Avatar answered Oct 06 '22 01:10

Ned Batchelder