No project description provided
Project description
pytest_nlcov
With pytest_nlcov
you can check the test coverage of new lines only. It will
check git for added and modified lines and will compute the coverage
just for those lines
Installation
pip install pytest_nlcov
Note: pytest_cov
is required and will be automatically installed when it
is not installed yet.
Usage with pytest
When pytest_nlcov
is installed, it will be discovered by pytest and executed as last step to
show you the test coverage of new lines.
pytest
Two option can be given:
- revision
- fail threshold
Revision
Default, the new lines are based on the git diff with master. You can specify other revisions.
pytest --nlcov-revision main
Fail Threshold
Optionally you can add a threshold to fail the tests when the coverage is below the threshold.
pytest --nlcov-fail-under 0.6
Usage without pytest
pytest_nlcov
can be run without pytest. Therefor you have to run coverage
first, because pytest_nlcov
needs its coverage data.
coverage
nlcov
Optionally a revision can be given
nlcov main
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
Hashes for pytest_nlcov-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de3a943ee4e993b42541cf5cfce332b71c991f0b0d733acf4d8f0e68acf4fd9e |
|
MD5 | 8478f58391bbc3ccfdcc6ddb0641449c |
|
BLAKE2b-256 | 9eeb6f97125456fa5df7a0879624b627fd27197d3577fe06d74b496dafb62a18 |