Analyze test redundancy using coverage data.
Project description
recov: Optimize Test Suites & Speed Up CI/CD
Motivation
Modern software projects often accumulate large test suites, but not all tests contribute unique value. Redundant tests slow down CI/CD pipelines, waste compute resources, and obscure true coverage gaps. recov helps you identify and remove tests that do not contribute unique coverage, so you can:
- Speed up CI/CD by running only the essential tests
- Reduce maintenance by focusing on meaningful tests
Features
- Detects redundant tests using coverage data (lines and branches)
- Fast, in-memory analysis with DuckDB and PyArrow
- Rich terminal output for easy review
- Works with pytest-cov and Coverage.py
- CLI and Python API
Quickstart
- Run your tests with coverage contexts:
pytest --cov=src --cov-context=test --cov-branch --cov-append
- Analyze for redundant tests:
uvx recov # or use the CLI entrypoint
Usage
- By default,
recovanalyzes line coverage. Use--with-branchesto require branch coverage. - Results show which tests are redundant (their coverage is fully covered by other tests).
- Remove or refactor redundant tests to optimize your suite and speed up CI/CD.
Source File Filter
By default, rcov filters source files using a hard-coded substring (src/recov). Update this filter in src/recov/__init__.py line 177 to match your project's source path (e.g., src/yourproject).
Development & Contributing
Contributions welcome: open issues or PRs to improve detection, performance, or usability.
AI Use Disclaimer
This tool has been built with a lot of support of AI.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file recov-0.1.2.tar.gz.
File metadata
- Download URL: recov-0.1.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
523ed29365ae6091a7183c7ff8aca024dce53840164429cd86252d7197211dc6
|
|
| MD5 |
9cd49c731e3ff3e20e356c292faaea85
|
|
| BLAKE2b-256 |
7fd590387c29070e5ff39d944b4b06a7811aaaffbd426e33413b9c984d2136d0
|
File details
Details for the file recov-0.1.2-py3-none-any.whl.
File metadata
- Download URL: recov-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74791b84f6fb645be1654e0bab8bab4c7d54e15dce8b372c6adb394645812c39
|
|
| MD5 |
df6d892315ede71ccce0753fc669fa17
|
|
| BLAKE2b-256 |
448d7e328f3e20122f5d5d90997d7fec042b359f35d544d0abf8629dd01c9f8a
|