← Browse all tools

Go Back
Report Abuse

Coverage.py

Code coverage measurement for Python

Tool overview

Coverage.py measures code coverage of Python programs. It monitors the program, notes which parts of the code have been executed, then analyses the source to identify code that could have been executed but was not.

It is typically used to gauge the effectiveness of tests, by showing which parts of the code are exercised by tests and which are not. Statement and branch coverage are measured, coverage data from several runs or processes can be combined, and contexts record which test executed each line. Reports are produced in the terminal or as HTML, XML, JSON and LCOV files. It is often run through pytest with the pytest-cov plugin. Recent versions support CPython 3.10 to 3.15 and PyPy.

Coverage.py is maintained by Ned Batchelder and is free and open source under the Apache 2.0 licence.

Screenshots & video

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://coverage.readthedocs.io/
https://github.com/nedbat/coveragepy