Spaces:
Build error
Build error
docs: add documentation update section to pytest migration spec
Browse files
docs/superpowers/specs/2026-06-13-pytest-migration-design.md
CHANGED
|
@@ -247,6 +247,29 @@ uv run pytest tests/ -v
|
|
| 247 |
|
| 248 |
The `pyproject.toml` already has `[tool.pytest.ini_options]` with `testpaths = ["tests"]` and `python_files = "*_test.py"`. No config changes needed.
|
| 249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 250 |
## Out of Scope
|
| 251 |
|
| 252 |
- Testing actual model inference (all engines mocked)
|
|
|
|
| 247 |
|
| 248 |
The `pyproject.toml` already has `[tool.pytest.ini_options]` with `testpaths = ["tests"]` and `python_files = "*_test.py"`. No config changes needed.
|
| 249 |
|
| 250 |
+
## Documentation Updates
|
| 251 |
+
|
| 252 |
+
### `AGENTS.md`
|
| 253 |
+
Update the "Testing Expectations" section to:
|
| 254 |
+
- Replace "Smoke Tests" description with pytest as the primary test runner
|
| 255 |
+
- Reference new test file naming convention (`*_test.py`)
|
| 256 |
+
- Add guidance on writing tests: use fixtures from `conftest.py`, mock engines via `unittest.mock.patch`, prefer assertions over print statements
|
| 257 |
+
- Remove references to `if __name__ == "__main__":` inline test pattern
|
| 258 |
+
- Update "Before Merging" checklist to include `uv run pytest tests/ -v`
|
| 259 |
+
|
| 260 |
+
### `README.md`
|
| 261 |
+
Add a "Running Tests" section after the setup/installation instructions:
|
| 262 |
+
```bash
|
| 263 |
+
# Run all tests
|
| 264 |
+
uv run pytest tests/ -v
|
| 265 |
+
|
| 266 |
+
# Run specific test file
|
| 267 |
+
uv run pytest tests/cards_test.py -v
|
| 268 |
+
|
| 269 |
+
# Run with coverage
|
| 270 |
+
uv run pytest tests/ -v --cov=core --cov=frontend --cov=app.py
|
| 271 |
+
```
|
| 272 |
+
|
| 273 |
## Out of Scope
|
| 274 |
|
| 275 |
- Testing actual model inference (all engines mocked)
|