views:

89

answers:

2

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?

+2  A: 

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.

Ned Batchelder
Thanks for confirming my suspicions Ned. Are the details about this feature in the next release available online anywhere? I'm curious about the details of how it's going to work.
Pete
Actually, Pete, I'm still mulling over how it would work. Drop me an email and we can talk: [email protected]
Ned Batchelder
+1  A: 

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

Ned Batchelder