You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 these versions of Python:
Python 3.9 through 3.14 beta 4, including free-threading.
PyPy3 versions 3.9, 3.10, and 3.11.
Documentation is on Read the Docs. Code repository and issue tracker are on
GitHub.
New in 7.x:[run] core setting;
[run] source_dirs setting;
Coverage.branch_stats();
multi-line exclusion patterns;
function/class reporting;
experimental support for sys.monitoring;
dropped support for Python 3.7 and 3.8;
added Coverage.collect() context manager;
improved data combining;
[run] exclude_also setting;
report --format=;
type annotations.
New in 6.x:
dropped support for Python 2.7, 3.5, and 3.6;
write data on SIGTERM;
added support for 3.10 match/case statements.
For Enterprise
Available as part of the Tidelift Subscription.
Coverage and thousands of other packages are working with
Tidelift to deliver one enterprise subscription that covers all of the open
source you use. If you want the flexibility of open source and the confidence
of commercial-grade software, this is for you.
Learn more.
Getting Started
Looking to run coverage on your test suite? See the Quick Start section
of the docs.
Everyone participating in the coverage.py project is expected to treat other
people with respect and to follow the guidelines articulated in the Python
Community Code of Conduct.
Contributing
Found a bug? Want to help improve the code or documentation? See the
Contributing section of the docs.
Security
To report a security vulnerability, please use the Tidelift security
contact. Tidelift will coordinate the fix and disclosure.