Skip to main content

Code coverage measurement for Python

Project description

Code coverage testing for Python.

Stand with Ukraine
PyPI status License Python versions supported
Test suite status Quality check status Documentation Coverage reports
Tidelift Sponsor me on GitHub GitHub stars coveragepy on Mastodon nedbat on Mastodon

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.8 through 3.12, and 3.13.0a3 and up.

  • PyPy3 versions 3.8 through 3.10.

Documentation is on Read the Docs. Code repository and issue tracker are on GitHub.

New in 7.x: experimental support for sys.monitoring; dropped support for Python 3.7; 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

Tidelift

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.

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.

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coverage-7.4.3.tar.gz (783.2 kB view hashes)

Uploaded Source

Built Distributions

coverage-7.4.3-pp38.pp39.pp310-none-any.whl (199.0 kB view hashes)

Uploaded PyPy

coverage-7.4.3-cp312-cp312-win_amd64.whl (210.1 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

coverage-7.4.3-cp312-cp312-win32.whl (209.2 kB view hashes)

Uploaded CPython 3.12 Windows x86

coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl (245.4 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ x86-64

coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl (243.7 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ i686

coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl (245.8 kB view hashes)

Uploaded CPython 3.12 musllinux: musl 1.1+ ARM64

coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (239.6 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (238.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (236.9 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl (207.2 kB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl (207.1 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

coverage-7.4.3-cp311-cp311-win_amd64.whl (209.9 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

coverage-7.4.3-cp311-cp311-win32.whl (209.0 kB view hashes)

Uploaded CPython 3.11 Windows x86

coverage-7.4.3-cp311-cp311-musllinux_1_1_x86_64.whl (246.5 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

coverage-7.4.3-cp311-cp311-musllinux_1_1_i686.whl (245.4 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ i686

coverage-7.4.3-cp311-cp311-musllinux_1_1_aarch64.whl (247.0 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ ARM64

coverage-7.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (238.7 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

coverage-7.4.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (237.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

coverage-7.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (236.2 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

coverage-7.4.3-cp311-cp311-macosx_11_0_arm64.whl (207.2 kB view hashes)

Uploaded CPython 3.11 macOS 11.0+ ARM64

coverage-7.4.3-cp311-cp311-macosx_10_9_x86_64.whl (206.9 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

coverage-7.4.3-cp310-cp310-win_amd64.whl (209.8 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

coverage-7.4.3-cp310-cp310-win32.whl (209.0 kB view hashes)

Uploaded CPython 3.10 Windows x86

coverage-7.4.3-cp310-cp310-musllinux_1_1_x86_64.whl (239.5 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

coverage-7.4.3-cp310-cp310-musllinux_1_1_i686.whl (238.4 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ i686

coverage-7.4.3-cp310-cp310-musllinux_1_1_aarch64.whl (240.2 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ ARM64

coverage-7.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (235.0 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

coverage-7.4.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (234.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

coverage-7.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (233.3 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

coverage-7.4.3-cp310-cp310-macosx_11_0_arm64.whl (207.1 kB view hashes)

Uploaded CPython 3.10 macOS 11.0+ ARM64

coverage-7.4.3-cp310-cp310-macosx_10_9_x86_64.whl (206.8 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

coverage-7.4.3-cp39-cp39-win_amd64.whl (209.9 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

coverage-7.4.3-cp39-cp39-win32.whl (209.0 kB view hashes)

Uploaded CPython 3.9 Windows x86

coverage-7.4.3-cp39-cp39-musllinux_1_1_x86_64.whl (239.1 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

coverage-7.4.3-cp39-cp39-musllinux_1_1_i686.whl (237.9 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ i686

coverage-7.4.3-cp39-cp39-musllinux_1_1_aarch64.whl (239.7 kB view hashes)

Uploaded CPython 3.9 musllinux: musl 1.1+ ARM64

coverage-7.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (234.6 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

coverage-7.4.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (233.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

coverage-7.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (232.9 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

coverage-7.4.3-cp39-cp39-macosx_11_0_arm64.whl (207.1 kB view hashes)

Uploaded CPython 3.9 macOS 11.0+ ARM64

coverage-7.4.3-cp39-cp39-macosx_10_9_x86_64.whl (206.8 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

coverage-7.4.3-cp38-cp38-win_amd64.whl (209.8 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

coverage-7.4.3-cp38-cp38-win32.whl (209.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

coverage-7.4.3-cp38-cp38-musllinux_1_1_x86_64.whl (240.4 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

coverage-7.4.3-cp38-cp38-musllinux_1_1_i686.whl (239.6 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ i686

coverage-7.4.3-cp38-cp38-musllinux_1_1_aarch64.whl (241.1 kB view hashes)

Uploaded CPython 3.8 musllinux: musl 1.1+ ARM64

coverage-7.4.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (236.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ ARM64

coverage-7.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (235.2 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

coverage-7.4.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (234.0 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

coverage-7.4.3-cp38-cp38-macosx_11_0_arm64.whl (207.1 kB view hashes)

Uploaded CPython 3.8 macOS 11.0+ ARM64

coverage-7.4.3-cp38-cp38-macosx_10_9_x86_64.whl (206.7 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page