mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-11-25 15:06:20 +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
|
## Rules
|
||||||
|
|
||||||
- **Prefer adding tests to existing test classes in existing test modules.**
|
- **Group the tests of one unit in a test class** (`Test<Unit>`, e.g.
|
||||||
Extend the relevant class/module rather than creating new files.
|
`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:
|
- Create a new test module only when:
|
||||||
- functionality is a distinct aspect that does not fit any existing module, or
|
- functionality is a distinct aspect that does not fit any existing module, or
|
||||||
- it targets a different component/test target.
|
- it targets a different component/test target.
|
||||||
|
|||||||
Reference in New Issue
Block a user