Looking at your code coverage is a good idea. But I found it a bit tedious to
remember the correct --with-coverage
switch for the test runner and then
to remember the correct line to generate reports and then to open them in my
webbrowser. So about a year ago I made a small package “tha.coverage” that
would do all of that. One single command to get your coverage reports
generated and opened in your webbrowser.
Someone asked for the source code because he wanted to make modifications. Oops, internal in my old company’s svn. One email later I got the source code: “put it on bitbucket and rename it”. There are now two fresh packages:
createzopecoverage, the original tha.coverage that works with the zope testrunner.
createcoverage, the same for running regular tests with the “regular” coverage.py.
In both cases, I assume you’re using buildout and that there’s a bin/test
that runs your tests. Just run bin/createcoverage
(or
bin/createzopecoverage
) to get your coverage reports.
See createcoverage’s pypi page for some more information and configuration hints.
My name is Reinout van Rees and I program in Python, I live in the Netherlands, I cycle recumbent bikes and I have a model railway.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):