Metadata-Version: 2.4
Name: pytest-culprit
Version: 0.1.0
Summary: Find the last Git commit where a pytest test started failing
Author-email: Vishal Teotia <vashuteotia123@gmail.com>
License: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pytest-culprit

A CLI tool to find the last Git commit where a specific pytest test started failing.

## 🚀 Installation

```bash
pip install pytest-culprit
```

## 🔍 Usage

```bash
pytest-culprit 15 pytest tests/test_rewards.py::test_logic
```

- `15`: Number of commits to check backward from HEAD
- `pytest ...`: 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
