Skip to main content

pytest-everyfunc

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 pytest command above.

Metadata

Release files for pytest-everyfunc 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-everyfunc 0.1.4
File Size Uploaded Provenance Actions
pytest_everyfunc-0.1.4.tar.gz 4.4 kB Without provenance Details for pytest_everyfunc-0.1.4.tar.gz

Release files / pytest_everyfunc-0.1.4.tar.gz

Download URL pytest_everyfunc-0.1.4.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6ad5d3931bc0afd2e0db76fa95f716188e949b2700848b34cb87240832f6b121
BLAKE2b-256 checksum
How to use checksums
3ff5511417b57c40100d0c23e7f8804d757a5e95534fd4fb1c548452d82b0bba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for pytest-everyfunc 0.1.4

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page