# pytest-dev/pytest-cov

Coverage plugin for pytest.

Repository: https://github.com/pytest-dev/pytest-cov
Canonical: https://ross.abutalabs.com/products/pytest-cov
Language: Python
License: MIT
License Family: permissive
Topics: pytest, python
Last push: 2026-04-24T21:33:08+00:00

## Health v2 (maintenance only)
Score: 68/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 79, release rhythm 35, longevity 100
- inputs: {"age_days": 4521, "days_push": 131, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2056, forks 243 (observed 2026-08-28T04:06:09.885641+00:00)

## What it is
pytest-cov is a pytest plugin that adds code coverage measurement to pytest runs, built on top of the coverage package. It provides extras like automatic .coverage file handling, coverage contexts, and pytest-xdist distributed testing support.

## Use cases
- measure code coverage of pytest test suites
- get coverage reports when running tests with pytest-xdist
- track which tests cover which lines with coverage contexts
- combine coverage data from parallel or subprocess test runs
- generate coverage reports as part of CI pipelines

## When to choose
- you use pytest and want coverage without manually running coverage run -m pytest
- you need coverage across distributed or parallel test execution with pytest-xdist
- you want automatic cleanup and merging of .coverage data files
- you want consistent sys.path behavior compared to raw coverage run

## When to avoid
- you don't use pytest as your test runner
- you need coverage for non-Python code
- you prefer configuring coverage.py directly without pytest integration

## Facets
- artifact type: plugin
- maturity: stable
- function: testing, developer-tools
- domain: testing, developer-tools
- platform: python, cli, cross-platform
- tags: pytest-plugin, code-coverage, coverage, pytest-xdist, subprocess-coverage, python

## Member repositories
- pytest-dev/pytest-cov (main) score 68

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:09.885641+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:57:14.990397+00:00, confidence not recorded.
  - readme: https://github.com/pytest-dev/pytest-cov (fetched 2026-08-28T04:06:09.885641+00:00, sha f2dbf3d2b1b1)
  - registry_pypi: https://pypi.org/pypi/pytest-cov/json (fetched 2026-08-29T10:37:34.212745+00:00, sha 1fb601b52cf2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
