mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-11-25 23:16:18 +01:00
docs(ai): group the tests of one unit in a test class
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Claude Code (claude-opus-5-5)
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
34c19c3573
commit
3256bca88e
@@ -11,8 +11,11 @@ description: Use when adding or updating pytest tests, fixing bugs, or changing
|
||||
|
||||
## Rules
|
||||
|
||||
- **Prefer adding tests to existing test classes in existing test modules.**
|
||||
Extend the relevant class/module rather than creating new files.
|
||||
- **Group the tests of one unit in a test class** (`Test<Unit>`, e.g.
|
||||
`TestToTimezone` for `to_timezone()`) in the existing test module of that
|
||||
code: add a test to the unit's class, and create the class when a unit gets
|
||||
its second test. Extend the relevant class/module rather than creating new
|
||||
files.
|
||||
- Create a new test module only when:
|
||||
- functionality is a distinct aspect that does not fit any existing module, or
|
||||
- it targets a different component/test target.
|
||||
|
||||
Reference in New Issue
Block a user