Coverage.py: code coverage testing for Python
Coverage.py measures code coverage, typically during test execution. It uses the code analysis tools and tracing hooks provided in the Python standard library to determine which lines are executable, and which have been executed.
For more information, see http://nedbatchelder.com/code/coverage
Code repo and issue tracking are at http://bitbucket.org/ned/coveragepy