better_coverage
better_coverage is a pytest plugin that displays pytest-cov coverage results in Jest/Istanbul's console format with a directory tree structure.
Why?
Using better_coverage lets you see coverage in Jest's familiar table format right in your terminal. The reporter organizes files into a directory tree, shows uncovered line ranges (e.g., 5-12,18), and applies the same color coding as Jest so your Python coverage reports look exactly like your JavaScript ones.
Usage
Add the package to your project:
pip install better-coverage
Then run your tests with coverage:
pytest --cov=your_package --cov-report=xml
The Jest-style coverage table will automatically appear at the end of your test run.
Options
The plugin automatically detects terminal width and formats output accordingly. Coverage data is read from pytest-cov, so use standard pytest-cov options:
pytest --cov=your_package --cov-report=xml --cov-branch
Use --cov-branch to enable branch coverage reporting.
Contributing
Contributions are welcome! If you find a bug or have suggestions for improvement, please open an issue or submit a pull request.
License
Apache License 2.0 © 2025 Mridang Agarwalla
Metadata
Release files for better-coverage 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| better_coverage-1.0.1.tar.gz | 14.8 kB | Without provenance | Details for better_coverage-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| better_coverage-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for better_coverage-1.0.1-py3-none-any.whl |
Total release size: 27.4 kB
Release files / better_coverage-1.0.1.tar.gz
| Download URL | better_coverage-1.0.1.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
47620b7c8fb607e92dd0de2fe16691735db4f46791221a73828fac59ab585683
|
|
BLAKE2b-256 checksum How to use checksums |
9b13fe4373a029e8a717e6d803c9e0bb57855f1520e3aac6e68e0fa8eb77e9fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / better_coverage-1.0.1-py3-none-any.whl
| Download URL | better_coverage-1.0.1-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c221b667733d712275ea82580fc982e3717bd92944da1b6459830254053f49db
|
|
BLAKE2b-256 checksum How to use checksums |
38540b984dad0154956c069cd5a9ece592e8649781aeb0f06eaeb4b8b22d974c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for better-coverage 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.