Pytest plugin that captures test results for TDD Guard validation.
- Python 3.8+
- pytest 6.0+
- TDD Guard installed globally
pip install tdd-guard-pytestThe plugin activates automatically when installed.
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/rootOption 3: setup.cfg
[tool:pytest]
tdd_guard_project_root = /absolute/path/to/project/root- Path must be absolute
- Current directory must be within the configured project root
- Falls back to current directory if configuration is invalid
When developing the pytest reporter, you need to configure the project root to ensure test results are saved to the correct location:
-
Copy the example configuration:
cp pytest.ini.example pytest.ini
-
Edit
pytest.iniand set the absolute path to your TDD Guard project root:[pytest] tdd_guard_project_root = /absolute/path/to/tdd-guard
Note: pytest.ini is gitignored to avoid committing machine-specific paths.
- Test results are saved to
.claude/tdd-guard/data/test.json - See TDD Guard documentation for complete setup
MIT