Skip to content

Commit cdffc45

Browse files
committed
chore: Add details about test structure
1 parent 9f2c312 commit cdffc45

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

roborock/devices/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,13 +659,19 @@ To reduce API calls and improve reliability:
659659

660660
### Testing
661661

662+
Test structur mirrors the python module structure. For example,
663+
the module `roborock.devices.traits.v1.maps` is tested in the file
664+
`tests/devices/traits/v1/test_maps.py`. Each test file corresponds to a python
665+
module.
666+
662667
The test suite uses mocking extensively to avoid real devices:
663668

664669
- `Mock` and `AsyncMock` for channels and sessions
665670
- Fake message generators (`mqtt_packet.gen_publish()`)
666671
- Snapshot testing for complex data structures
667672
- Time-based tests use small timeouts (10-50ms) for speed
668673

674+
669675
Example test structure:
670676
```python
671677
@pytest.fixture

0 commit comments

Comments
 (0)