Skip to main content

cmp-cov

Compare local pytest coverage against a saved baseline.

Usage

# After running pytest --cov, save current coverage as the baseline:
uvx cmp-cov save-baseline

# Later, after another pytest --cov run, diff against the baseline:
uvx cmp-cov diff

Both subcommands take an optional baseline name (default default); each name is a separate slot, so multiple baselines per project coexist:

cmp-cov save-baseline main
cmp-cov save-baseline before-refactor
cmp-cov diff main

save-baseline snapshots the current .coverage (SQLite) and source files into ~/.cache/cmp-coverage/<encoded-project-path>/<name>/. diff regenerates current coverage XML, translates baseline line numbers through the snapshotted sources (so source edits between save and diff are handled), and prints per-line diffs grouped by category. Exit code is non-zero if total coverage dropped or any regression / new uncovered line was found.

Each output location is rendered as path:line so it is clickable in editors that support terminal links (e.g. VSCode).

Output categories

  • ↓ covered → uncovered — lines that were covered in baseline and are not anymore.
  • + new uncovered — lines added since baseline that are not covered.
  • ↓ covered line removed — lines that were covered in baseline and have been deleted from the source. Path points at the cached baseline snapshot.
  • ↑ uncovered → covered — lines that were not covered in baseline and are covered now.
  • + new covered — lines added since baseline that are covered.
  • - removed line — non-covered lines that were removed.
  • ! unmeasured in baseline (uncovered) — lines in files that were not measured by the baseline run, currently not covered.
  • ! unmeasured in baseline (covered) — same, but covered now (compact view).

Metadata

Release files for cmp-cov 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmp-cov 0.2.0
File Size Uploaded
cmp_cov-0.2.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cmp-cov 0.2.0
File Interpreter ABI Platform
cmp_cov-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / cmp_cov-0.2.0.tar.gz

Download URL cmp_cov-0.2.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
7860bc551aaa68133939103c3cb22eca38043d730fe843466d7c464e6c20626b
BLAKE2b-256 checksum
How to use checksums
6bae0e7216b49230488e18594446d185824d164fba52c50280e31b227aadbeba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cmp_cov-0.2.0-py3-none-any.whl

Download URL cmp_cov-0.2.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bccf07c1edd50b034d6ec01b368dd01565dc503683faaa37e63011fcd809624
BLAKE2b-256 checksum
How to use checksums
9ca5b74def8feaa7d5957632021810f660e00cae8190f60c8b24e49f9989df88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page