|Ned Batchelder : Blog | Code | Text | Site|
Coverage.py v3.4 beta 2: uncovered files
» Home : Blog : September 2010
I just posted Coverage.py v3.4 beta 2, the latest version of my code coverage measurement tool for Python. The biggest change is now if you specify --source to tell coverage where to find source files, it will identify file that weren't executed at all, and add their 0% coverage to the final report. This has been a highly requested feature for a long time, and for good reason: what's the point in measuring lines that aren't executed if entire files slip by unnoticed?
But unexecuted files are only detected if --source is specified, because otherwise coverage.py won't know where to search for files. I don't know if there's a useful default for something like this. Let me know if you have any interesting ideas.
A small but interesting change: coverage percentages will now only be reported as 100% or 0% if they are truly all or nothing. In the past, you could have 99.6% rounded to 100%, or 0.4% rounded to 0%.