skillfed

pytest-cov

Pytest plugin for measuring coverage.

pytest-cov Permissive license MIT Active 2,054 v7.1.0 released

Install

pytest-cov on PyPI

pip

pip install pytest-cov

uv

uv add pytest-cov

poetry

poetry add pytest-cov

Package 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

Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: TestingTopic :: Utilities

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...

Read as markdown · JSON record · Source repository · Docs

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
pytest coverage plugincode coverage measurement pytesttest coverage reportingpytest distributed coveragecoverage integration pytestmeasure test code coveragepytest coverage xdist

Similar packages