tdd-guard-pytest
raw JSON → 0.1.2 verified Fri May 01 auth: no python
Pytest plugin for TDD Guard that enforces Test-Driven Development principles during testing. Current version 0.1.2, requires Python >=3.8. Released as part of the TDD Guard ecosystem; releases are sporadic.
pip install tdd-guard-pytest Common errors
error ModuleNotFoundError: No module named 'tdd-guard-pytest' ↓
cause Trying to import using hyphens instead of underscores.
fix
Use 'import tdd_guard_pytest' (underscores) instead of 'import tdd-guard-pytest'.
error pytest: error: unrecognized arguments: --tdd-guard ↓
cause The plugin is not installed or not activated (missing entry point).
fix
Ensure 'tdd-guard-pytest' is installed in the same environment as pytest. Run 'pip install tdd-guard-pytest'.
Warnings
gotcha The plugin requires the 'tdd-guard' main package installed separately (npm package). Without it, the pytest plugin may not function as expected. ↓
fix Install the TDD Guard CLI: npm install -g tdd-guard
breaking The package name uses hyphens but the import path uses underscores (tdd_guard_pytest). A common mistake is to use hyphens in imports. ↓
fix Use 'import tdd_guard_pytest' or 'from tdd_guard_pytest import ...'
Imports
- TDDGuardPlugin
from tdd_guard_pytest.plugin import TDDGuardPlugin
Quickstart
import pytest
# Ensure TDD Guard plugin is installed (auto-registered via entry point)
# Run tests with: pytest --tdd-guard
def test_example():
assert 1 + 1 == 2