Saturday 21 August 2010 — This is 14 years old. Be careful.
Coverage.py v3.4 beta 1 is available now. 3.4 brings improved source code specification. The --omit and --include switches have changed in an incompatible way, taking file patterns rather than prefixes, and a new --source switch specifies directories or modules to measure. Details are in the new page about specifying source files in the coverage.py docs. These changes should help people focus coverage.py on the code they really want to measure.
In addition, a few bug fixes have helped in this area: Jinja templates and doctest bodies are no longer measured, since they produced errors during reporting anyway.
One other notable change: coverage.py used to report the number of statements, and the number of executed statements. Now instead of executed statements, it reports missed statements. This is a better indicator of how well your code is covered, because it’s clear what the goal is: zero missed statements.
Give this version a try. There have been lots of changes. Also, I hate to admit it: but this version has broken my own coverage measurement of coverage.py itself, and I haven’t figured out why yet...
Comments
I've used lot of your works including coverage.py, thanks a lot for it.
I'm developing a software in cython. After a lot of searching i could not find a way to get coverage of cython files.
Do you have any idea about it or maybe point me in the right direction so that i may add hooks to coverage.py to get it to report cython files' coverage also.
If line coverage is not possible at least function coverage would be a nice addition :)
Regards
I know coverage.py cant help with the c files, but cython actually generates code to hook to python profilers (cProfile) so that cProfile can report cython function calls in its report. Maybe there's some way to make coverage.py get this information and report which functions in the cython files are covered.
So i'd like to know how coverage does it (some documentation/source) and some pointers as to where do i dig into its source to be able to modify it to report such information. I think it will be a nice feature.
Thanks again.
Add a comment: