/
README (full)
Coverage.py
Code coverage measurement for Python.
:target: https://vshymanskyy.github.io/StandWithUkraine :alt: Stand with Ukraine
-------------
|
|
|
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 1, 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] 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
Getting Started
Looking to run coverage on your test suite? See the Quick Start section of the docs.
Change history
The complete history of changes is on the change history page.
Code of Conduct
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.
License
Licensed under the Apache 2.0 License. For details, see NOTICE.txt.
:target: https://github.com/nedbat/coveragepy/actions/workflows/testsuite.yml :alt: Test suite status
:target: https://github.com/nedbat/coveragepy/actions/workflows/quality.yml :alt: Quality check status
:target: https://coverage.readthedocs.io/ :alt: Documentation
:target: https://pypi.org/project/coverage/ :alt: PyPI status
:target: https://pypi.org/project/coverage/ :alt: Python versions supported
:target: https://pypi.org/project/coverage/ :alt: License
:target: https://nedbat.github.io/coverage-reports/latest.html :alt: Coverage reports
:target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme :alt: Tidelift
:target: https://github.com/nedbat/coveragepy/stargazers :alt: GitHub stars
:target: https://hachyderm.io/@nedbat :alt: nedbat on Mastodon
:target: https://hachyderm.io/@coveragepy :alt: coveragepy on Mastodon
:target: https://bsky.app/profile/nedbat.com :alt: nedbat on Bluesky
:target: https://github.com/sponsors/nedbat :alt: Sponsor me on GitHub
| dir | .github/ |
| dir | benchmark/ |
| dir | ci/ |
| dir | coverage/ |
| dir | coverage.egg-info/ |
| dir | debian/ |
| dir | doc/ |
| dir | lab/ |
| dir | requirements/ |
| dir | tests/ |
| file | .editorconfig |
| file | .git-blame-ignore-revs |
| file | .ignore |
| file | .pre-commit-config.yaml |
| file | .readthedocs.yaml |
| file | CHANGES.rst |
| file | CITATION.cff |
| file | CONTRIBUTORS.txt |
| file | LICENSE.txt |
| file | MANIFEST.in |
| file | Makefile |
| file | NOTICE.txt |
| file | PKG-INFO |
| file | README.rst |
| file | __main__.py |
| file | howto.txt |
| file | igor.py |
| file | metacov.ini |
| file | pyproject.toml |
| file | setup.cfg |
| file | setup.py |
| file | tox.ini |