Coverage.py 4.1b3 and the truth about Coverage.py

Tuesday 10 May 2016This is more than eight years old. Be careful.

Work on Coverage.py 4.1 is continuing: beta 3 is available.

If you haven’t used any of the 4.1 betas, the big change is that branch coverage has been completely rewritten. The new code produces much more reliable results, and has allowed me to implement things like better support for lambdas. Eleven bugs with branch coverage have been fixed.

The HTML report has a cool new feature, contributed by Dmitry Shishov, a map in the scrollbar of where the highlighted lines are, so you can quickly drag to where you need to look. (By the way, there are also keyboard shortcuts to do that, have been for a long time!)

One small backward-incompatibility: if you’ve been using the API, and calling the Coverage.report function, the default for the show_missing parameter has changed.

Try Coverage.py 4.1b3 and let me know what you think.

Now, the truth about Coverage.py: I think it could be much better. There are lots of things about the internals that I don’t like. I think the classes could be refactored better. Too many of the tests are integration tests rather than unit tests. Too many real-world scenarios aren’t covered by tests. I’m not good at staying on top of the pull requests and issues. If you think you could help with any of this, get in touch.

Comments

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.