Metadata-Version: 2.4
Name: better-coverage
Version: 1.0.0
Summary: Pytest reporter displaying pytest-cov coverage in Jest/Istanbul format with directory tree
Author-email: Mridang Agarwalla <mridang.agarwalla@gmail.com>
Maintainer-email: Mridang Agarwalla <mridang.agarwalla@gmail.com>
License: Apache-2.0
Project-URL: homepage, https://github.com/mridang/pytest-reporters
Project-URL: repository, https://github.com/mridang/pytest-reporters
Project-URL: documentation, https://github.com/mridang/pytest-reporters
Project-URL: Bug Tracker, https://github.com/mridang/pytest-reporters/issues
Keywords: pytest,coverage,istanbul,jest,reporter,pytest-plugin,coverage-reporter
Classifier: Topic :: Software Development :: Libraries
Classifier: Framework :: Pytest
Requires-Python: !=3.9.0,!=3.9.1,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pytest>=7.0.0
Requires-Dist: pytest-cov>=2.8.1
Dynamic: license-file

# 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:

```bash
pip install better-coverage
```

Then run your tests with coverage:

```bash
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:

```bash
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
