coverage.py is a tool for measuring test code coverage of Python programs
About
coverage.py
is a tool for measuring test 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.
-- taken from https://coverage.readthedocs.io/
Install Instructions
You can install coverage.py with pip
$ pip install coverage
Usage
Run coverage.py with:
$ coverage run my_program.py arg1 arg2
Output looks like:
$ coverage report -m
Name Stmts Miss Cover Missing
-------------------------------------------------------
my_program 20 4 80% 33-35, 39
my_other_module 56 6 89% 17-23
-------------------------------------------------------
TOTAL 76 10 87%
Details can be found here.