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.
Coverage.py runs on many versions of Python:
- CPython 2.6, 2.7 and 3.3 through 3.6.
- PyPy2 5.6 and PyPy3 5.5.
- Jython 2.7.1, though not for reporting.
New in 4.3: HTML --skip-covered, sys.excepthook support, tox.ini support.
New in 4.2: better support for multiprocessing and combining data.
New in 4.1: much-improved branch coverage.
New in 4.0: --concurrency, plugins for non-Python files, setup.cfg support, --skip-covered, HTML filtering, and more than 50 issues closed.
See the Quick Start section of the docs.