pytest-cov
Pytest plugin for measuring coverage.
Install
pytest-cov on PyPI
pip
pip install pytest-covuv
uv add pytest-covpoetry
poetry add pytest-covPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — coverage, pluggy, pytest |
| Maintenance | actively maintained — 145 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pytest_cov-7.1.0-py3-none-any.whl
Keywords: cover, coverage, distributed, parallel, py.test, pytest
About pytest-cov
from the package's own PyPI description — quoted content, verbatim
======== Overview ========
.. start-badges
.. list-table:: :stub-columns: 1
* - docs
- |docs|
* - tests
- |github-actions|
* - package
- |version| |conda-forge| |wheel| |supported-versions| |supported-implementations| |commits-since|
.. |docs| image:: https://readthedocs.org/projects/pytest-cov/badge/?style=flat :target: https://readthedocs.org/projects/pytest-cov/ :alt: Documentation Status
.. |github-actions| image:: https://github.com/pytest-dev/pytest-cov/actions/workflows/test.yml/badge.svg :alt: GitHub Actions Status :target: https://github.com/pytest-dev/pytest-cov/actions
.. |version| image:: https://img.shields.io/pypi/v/pytest-cov.svg :alt: PyPI Package latest release :target: https://pypi.org/project/pytest-cov
.. |conda-forge| image:: https://img.shields.io/conda/vn/conda-forge/pytest-cov.svg :target: https://anaconda.org/conda-forge/pytest-cov .. |wheel| image:: https://img.shields.io/pypi/wheel/pytest-cov.svg :alt: PyPI Wheel :target: https://pypi.org/project/pytest-cov
.. |supported-versions| image:: https://img.shields.io/pypi/pyversions/pytest-cov.svg :alt: Supported versions...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
A pytest plugin that measures code coverage during test runs, automatically combining coverage data and supporting distributed testing with pytest-xdist.
Low friction: pure Python wheel with three stable runtime dependencies (coverage, pluggy, pytest). Actively maintained with recent releases and 2054 GitHub stars. Last commit 2026-04-24 indicates ongoing development.
MIT license (permissive) means you can use, modify, and distribute pytest-cov freely in commercial and private projects with minimal restrictions.
Usage
pip install pytest-cov
pytest --cov=myproj tests/
# Produces coverage report:
# Name Stmts Miss Cover
# myproj/__init__ 2 0 100%
# myproj/myproj 257 13 94%
Requires Python >=3.9 and coverage package (installed as dependency). For distributed testing, pytest-xdist must be installed separately.
Verdict: Mature, well-maintained pytest plugin in the top 1000 PyPI packages with zero known vulnerabilities. Low install friction and permissive MIT licensing make it a straightforward choice for adding coverage measurement to test suites. Active development and broad Python version support (3.9–3.14) ensure compatibility.
Needs verification
- Whether coverage context feature (--cov-context=test) is documented with examples in the linked ReadTheDocs
- Specific performance impact of coverage measurement on test execution time for large test suites
- Whether the sqlite3 ResourceWarning filter in 7.1.0 resolves issues in all common testing scenarios
Similar packages
permissive · top 1,000 on PyPI
pytest-xdistpermissive · top 1,000 on PyPI
lazy-object-proxypermissive · top 1,000 on PyPI
pypermissive · top 1,000 on PyPI
coveragepermissive · top 1,000 on PyPI
pytest-json-ctrfpermissive · top 1,000 on PyPI
pytest-djangopermissive · top 1,000 on PyPI
hatchlingpermissive · top 100 on PyPI
execnetpermissive · top 1,000 on PyPI
pluggypermissive · top 100 on PyPI