Commit 5138864
committed
Issue #164: rename test_yaml_generator.py and add parametrized coverage
Rename tests/unit/test_yaml_generator.py -> test_safety_yaml_generator.py
via git mv (preserves history) to mirror pumpahead/safety_yaml_generator.py.
Augment with:
- living_room_fixture + multi_room_fixture (reusable pytest fixtures
including the no-split 'Lazienka Dolna' bathroom heating-only case)
- TestSafetyYAMLConfigExtra: empty/whitespace entity_pumpahead_last_update
validators (closes line 161-163 coverage gap, bringing coverage to 100%)
- TestIdempotency: explicit string-equality checks for full, multi-room,
and per-room YAML generation
- TestParametrizedThresholds: 26 parametrized test invocations covering
S1/S3/S4 numeric thresholds, S5 template thresholds, S2 margins, and
split-presence drives HVAC action logic
- TestBathroomHeatingOnly: documents no-split room edge case (S2/S3/S4)
- TestHumiditySensorAbsence: parametrized negative + positive S2 template
- TestMultiRoomFixture: exercises multi_room_fixture end-to-end
Coverage on pumpahead/safety_yaml_generator.py: 100%.
ruff check + format: clean.1 parent 002a006 commit 5138864
1 file changed
Lines changed: 416 additions & 0 deletions
0 commit comments