A brief introduction to coverage.py

Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests. It can show which parts of your code are being exercised by tests, and which are not. Getting started: Install coverage: pip install coverage easy_install coverage Use coverage to run your program and gather data: $ coverage run my_program....

September 22, 2011 · Ratnadeep Debnath