A pytest plugin to detect completely untested functions using coverage
Project description
A pytest plugin to detect completely untested functions using coverage.
Motivation
If you add pytest-everyfunc to your CI, you can prevent yourself from checking in code that adds functions without tests.
Installation
- ::
$ pip install pytest-everyfunc
Usage
- ::
$ pytest –cov=mypackage –fail-on-untested … tests/test_script.py …….. [100%] mypackage/foo.py:253: untested function: rv_logpdf mypackage/bar.py:717: untested function: norms mypackage/baz.py:86: untested function: prior_predictive_check_plot Exit: Untested functions found.
The output shows the functions that were not called.
If –fail-on-untested is set, then the exit code is 32 (regardless whether tests succeed).
- ::
$ echo $? 32
git hook
add to .git/hooks/pre-commit the command above.
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
File details
Details for the file pytest_everyfunc-0.1.1.tar.gz.
File metadata
- Download URL: pytest_everyfunc-0.1.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e957be3ad989baea6a411499c0a993090202851a5b82332a223887b8586f67c
|
|
| MD5 |
8b98b92178d432991b9d945c16c06016
|
|
| BLAKE2b-256 |
90fd29431388e58a4a6c936d8a023719221ee7b6cebdc3ddfba021e06564abcc
|