pytest-culprit
A CLI tool to find the last Git commit where a specific pytest test started failing.
🚀 Installation
pip install pytest-culprit
🔍 Usage
pytest-culprit 15 pytest tests/test_rewards.py::test_logic
15: Number of commits to check backward from HEADpytest ...: The test command to run
🧠 What it does
- Walks backward through Git commits
- Runs your test command at each one
- Stops when the test passes
- Prints details of the last failing commit (the culprit)
📌 Example Output
📌 Starting from branch: main
▶️ Running test at commit 0a45b22 [3/15]
✅ Test started passing here.
❌ Last failing commit was:
commit f87d098
Author: Vishal Teotia <vishal@github.com>
Date: 2025-05-15
break: tests
🧪 This commit broke: pytest tests/test_rewards.py::test_logic
⚖ License
MIT
Metadata
Release files for pytest-culprit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pytest_culprit-0.1.0.tar.gz | 3.2 kB | Without provenance | Details for pytest_culprit-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_culprit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pytest_culprit-0.1.0-py3-none-any.whl |
Total release size: 7.2 kB
Release files / pytest_culprit-0.1.0.tar.gz
| Download URL | pytest_culprit-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ada7e87329a13abf84baf234d29c53d11a7203b59c7d294ae4f463f65673c91
|
|
BLAKE2b-256 checksum How to use checksums |
2ae5618d95dfc459e60f9c50e2de9abe7d170a988f9a8bf6899560fe1e46b8d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / pytest_culprit-0.1.0-py3-none-any.whl
| Download URL | pytest_culprit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a2e71df40200a47af2fd53c6c7159a1053e4eef53c2308749234b3402e8ee53
|
|
BLAKE2b-256 checksum How to use checksums |
b5cd192698232b932880703188f287ddb0339a3c2571467751f914f116fde5b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for pytest-culprit 0.1.0
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.