From ce84853059475be1aedbecfb0b3c93e1d53fe12b Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:49:54 +0000 Subject: [PATCH] Fix humidity test name and docstring to match its cases The test was named and documented only for the no-sensor case, but its parametrization also asserts that a real reading is kept and that null is dropped, which misled readers about what it verifies. Co-Authored-By: Claude Opus 5.5 --- tests/test_graphql_value_mapper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_graphql_value_mapper.py b/tests/test_graphql_value_mapper.py index 1239e43..2aaa49e 100644 --- a/tests/test_graphql_value_mapper.py +++ b/tests/test_graphql_value_mapper.py @@ -33,10 +33,10 @@ def test_smart_meter_maps_zigbee_channel() -> None: pytest.param(None, [], id="null"), ], ) -def test_thermostat_humidity_skips_missing_sensor( +def test_thermostat_humidity_reports_only_real_readings( ambient_humidity: float | None, expected: list[float] ) -> None: - """Models without a humidity sensor report 0, which must not surface as 0%.""" + """Non-zero humidity is kept; 0 (no sensor, e.g. HT402) or null is dropped.""" device = _device("onAnyDeviceUpdated-tstat.json") device["ambientHumidity"] = ambient_humidity