Metadata-Version: 2.4
Name: tdd-guard-pytest
Version: 0.1.2
Summary: Pytest plugin for TDD Guard - enforces Test-Driven Development principles
Author: Nizar Selander, Durafen
License-Expression: MIT
Project-URL: Homepage, https://github.com/nizos/tdd-guard
Project-URL: Repository, https://github.com/nizos/tdd-guard
Project-URL: Bug Tracker, https://github.com/nizos/tdd-guard/issues
Project-URL: Documentation, https://github.com/nizos/tdd-guard/tree/main/reporters/pytest
Keywords: tdd,test-driven-development,testing,pytest,claude
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pytest>=6.0

# TDD Guard Pytest Reporter

Pytest plugin that captures test results for TDD Guard validation.

## Requirements

- Python 3.8+
- pytest 6.0+
- [TDD Guard](https://github.com/nizos/tdd-guard) installed globally

## Installation

```bash
pip install tdd-guard-pytest
```

The plugin activates automatically when installed.

## Configuration

### Project Root Configuration

Set `tdd_guard_project_root` to your project root using any ONE of these methods:

**Option 1: pyproject.toml**

```toml
[tool.pytest.ini_options]
tdd_guard_project_root = "/absolute/path/to/project/root"
```

**Option 2: pytest.ini**

```ini
[pytest]
tdd_guard_project_root = /absolute/path/to/project/root
```

**Option 3: setup.cfg**

```ini
[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

## Development

When developing the pytest reporter, you need to configure the project root to ensure test results are saved to the correct location:

1. Copy the example configuration:

   ```bash
   cp pytest.ini.example pytest.ini
   ```

2. Edit `pytest.ini` and set the absolute path to your TDD Guard project root:
   ```ini
   [pytest]
   tdd_guard_project_root = /absolute/path/to/tdd-guard
   ```

**Note:** `pytest.ini` is gitignored to avoid committing machine-specific paths.

## More Information

- Test results are saved to `.claude/tdd-guard/data/test.json`
- See [TDD Guard documentation](https://github.com/nizos/tdd-guard) for complete setup

## License

MIT
