From 6dcb8aee2119df648506ab06552501c4e7ba23e4 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 16:47:59 +0000 Subject: [PATCH] =?UTF-8?q?Deterministically=20guard=20the=20electric-unde?= =?UTF-8?q?rfloor=20descriptions=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/domain/epc/test_main_heating_guard.py | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/domain/epc/test_main_heating_guard.py b/tests/domain/epc/test_main_heating_guard.py index a32f3710f..cec0ca2df 100644 --- a/tests/domain/epc/test_main_heating_guard.py +++ b/tests/domain/epc/test_main_heating_guard.py @@ -19,6 +19,34 @@ def test_guard_resolves_high_heat_retention_storage() -> None: assert result is MainHeatingSystemType.ELECTRIC_STORAGE_HIGH_HEAT_RETENTION +@pytest.mark.parametrize( + ("description", "expected"), + [ + # Electric underfloor dumped into Direct-acting / old storage (ADR-0046). + ( + "Electric Underfloor Heating: In concrete slab (off-peak only)", + MainHeatingSystemType.ELECTRIC_UNDERFLOOR_SLAB_OFF_PEAK, + ), + ( + "Electric Underfloor Heating: Integrated (storage+direct-acting) (off peak)", + MainHeatingSystemType.ELECTRIC_UNDERFLOOR_INTEGRATED, + ), + ( + "Electric Underfloor Heating: In screed above insulation (standard or off peak)", + MainHeatingSystemType.ELECTRIC_UNDERFLOOR_SCREED, + ), + ], +) +def test_guard_resolves_electric_underfloor( + description: str, expected: MainHeatingSystemType +) -> None: + # Act + result = main_heating_guard(description) + + # Assert + assert result is expected + + @pytest.mark.parametrize( ("description", "expected"), [