Pytest plugin for TDD Guard - enforces Test-Driven Development principles
Project description
TDD Guard Pytest Reporter
Pytest plugin that captures test results for TDD Guard validation.
Requirements
- Python 3.8+
- pytest 6.0+
- TDD Guard installed globally
Installation
pip install tdd-guard-pytest
The plugin activates automatically when installed.
Configuration
TDD Guard needs consistent test result locations. Two configurations ensure this:
- Environment variable - Keeps Claude Code in the project root
- Pytest setting - Tells the reporter where to save results
Environment Setup
Set Claude Code to maintain the project root:
# In ~/.zshrc or ~/.bashrc
export CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1
This returns Claude Code to the project root after each command. See environment variables documentation for details.
Restart your terminal or run source ~/.zshrc after adding.
Project Root Configuration
Set tdd_guard_project_root to your project root using any ONE of these methods:
Option 1: pyproject.toml
[tool.pytest.ini_options]
tdd_guard_project_root = "/absolute/path/to/project/root"
Option 2: pytest.ini
[pytest]
tdd_guard_project_root = /absolute/path/to/project/root
Option 3: setup.cfg
[tool:pytest]
tdd_guard_project_root = /absolute/path/to/project/root
Configuration Rules
- Path must be absolute
- Current directory must be within the configured project root
- Falls back to current directory if configuration is invalid
More Information
- Test results are saved to
.claude/tdd-guard/data/test.json - See TDD Guard documentation for complete setup
License
MIT
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tdd_guard_pytest-0.1.1.tar.gz.
File metadata
- Download URL: tdd_guard_pytest-0.1.1.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8345c1823c21201aaa728b0aa36ade069aead67b73843cd6b1331be91407ac53
|
|
| MD5 |
5bb9a5b067587336ae359b1f8d00e0f9
|
|
| BLAKE2b-256 |
5d878f3be66993d130d5a6081f0d0630504c4eae237cc98b0cca1ea0364183c4
|
File details
Details for the file tdd_guard_pytest-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tdd_guard_pytest-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f926a94b2b0473e38c0a006264f057e35037ea94b879188fd999ca7e71931a26
|
|
| MD5 |
2b27581ad9af53ca77531cb58a20c3a2
|
|
| BLAKE2b-256 |
ab9f58ef92f5cf4ee3423f252e4fa8d9e87962121e061b40923df3eec3d52818
|