[Python-Dev] Code coverage reporting.

Titus Brown titus at caltech.edu
Mon Jun 19 07:53:01 CEST 2006

On Mon, Jun 19, 2006 at 02:21:04PM +1000, Nick Coghlan wrote:
-> Brett Cannon wrote:
-> >But it does seem accurate; random checking of some modules that got high 
-> >but not perfect covereage all seem to be instances where dependency 
-> >injection would be required to get the tests to work since they were 
-> >based on platform-specific things.
-> There's something odd going on with __future__.py, though. The module level 
-> code all shows up as not executed, but the bodies of the two _Feature 
-> methods both show up as being run.
-> I'm curious as to how a function body can be executed without executing the 
-> function definition first :)

Coverage recording probably wasn't on at the time the module was
imported; I only turn on recording in the 'runtest' function, and
not before.  I should probably start it earlier ;)

-> As far as making the comments/docstrings less obvious goes, grey is usually 
-> a good option for that.

I'll try it out and see...


More information about the Python-Dev mailing list