Pytest plugin for uploading pytest-cov results (coverage reports) to codecov.io. Current version 0.7.0, released 2025-01-26, with support for Python >=3.8. Release cadence is irregular, with major updates every few years.
pip install pytest-codecovVerified import paths — ran on the pinned version, not inferred.
Minimal setup: install pytest-cov and pytest-codecov, then run pytest with --cov and --cov-report=xml. The plugin uploads coverage to Codecov automatically.
Update network rules to allow connections to upload.codecov.io.
Run your tests using pytest command or pytest.main() in code.
Use --cov-report=xml or ensure cov-report is set to xml in pytest configuration.
Install codecov-cli and follow its configuration; or use the --codecov-cli flag if available.
Set the environment variable CODECOV_SLUG to 'owner/repo' or use the --codecov-slug command-line option.
Install pytest-cov: pip install pytest-cov