flying-sheep / fine-coverage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fine-coverage

A simple experiment to trace coverage at a granularity finer than lines, using Python 3.11’s new debug ranges information (PEP 657).

Table of Contents

Usage

After installation, use fine-coverage or python -m fine_coverage. It accepts the --cov CLI option telling it what Python module to track coverage for, as well as a module name to run and its options:

fine-coverage --cov=mypackage pytest -v

In the above example, it will report which code in mypackage got executed while running the equivalent of python -m pytest -v.

Below you see an excerpt from the output when run on its own code. So far only tracks and, or, and if else expressions.

Screenshot

Installation

rm -rf dist
python -m build
pip install dist/*.whl

License

fine-coverage is distributed under the terms of the GPL license.

About

License:GNU General Public License v3.0


Languages

Language:Python 100.0%