Skip to content

Commit c7dc6a3

Browse files
committed
docs(AGENTS): add functional-only test style guideline
Document that class-based tests are forbidden and only functional pytest tests should be used. Update example command to reflect this convention.
1 parent 40e8aff commit c7dc6a3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

AGENTS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,11 @@ windows:
9696

9797
## Testing Guidelines
9898

99+
- **Use functional tests only**: Write tests as standalone functions, not classes. Avoid `class TestFoo:` groupings - use descriptive function names and file organization instead.
99100
- Use pytest fixtures from `tests/fixtures/` for tmux objects
100101
- Test plugins using mock packages in `tests/fixtures/pluginsystem/`
101102
- Use `retry_until` utilities for async tmux operations
102-
- Run single tests with: `uv run py.test tests/file.py::TestClass::test_method`
103+
- Run single tests with: `uv run py.test tests/file.py::test_function_name`
103104
- **Use libtmux fixtures**: Prefer `server`, `session`, `window`, `pane` fixtures over manual setup
104105
- **Avoid mocks when fixtures exist**: Use real tmux fixtures instead of `MagicMock`
105106
- **Use `tmp_path`** fixture instead of Python's `tempfile`

0 commit comments

Comments
 (0)