mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2026-11-13 09:13:30 +01:00
31 lines
1.0 KiB
Markdown
31 lines
1.0 KiB
Markdown
---
|
|||
|
|
name: testing
|
||
|
|
description: Use when adding or updating pytest tests, fixing bugs, or changing behavior that needs test coverage.
|
||
|
|
---
|
||
|
|
|
||
|
|
# Testing
|
||
|
|
|
||
|
|
## When to use
|
||
|
|
|
||
|
|
- Any behavior change or bug fix.
|
||
|
|
|
||
|
|
## Rules
|
||
|
|
|
||
|
|
- **Prefer adding tests to existing test classes in existing test modules.**
|
||
|
|
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.
|
||
|
|
- Follow existing conventions, fixtures, and markers.
|
||
|
|
- Prefer deterministic, isolated tests; mock external services/devices.
|
||
|
|
- Cover boundary conditions and error paths.
|
||
|
|
- Do not weaken tests to accommodate implementation defects.
|
||
|
|
|
||
|
|
## Verify
|
||
|
|
|
||
|
|
- Run the relevant pytest tests and checks with the project's configured
|
||
|
|
commands and environment before declaring the change complete.
|
||
|
|
- Run a full test run:
|
||
|
|
- Only one run at a time. Stop any running full test run before start of a new.
|
||
|
|
- Run the equivalent of make gen-docs before a full run.
|