From 49f783de45fa89602ba29efc6efcba5f1dc0d62b Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Fri, 19 Jun 2026 14:20:02 +0000 Subject: [PATCH] =?UTF-8?q?Decode=20from-main=20oil/LPG/coal=20and=20gas?= =?UTF-8?q?=20boiler-circulator=20water=20heating=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) --- .../domain/epc/test_water_heating_overlay.py | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/domain/epc/test_water_heating_overlay.py b/tests/domain/epc/test_water_heating_overlay.py index 6e0b1fdb..12e6e8be 100644 --- a/tests/domain/epc/test_water_heating_overlay.py +++ b/tests/domain/epc/test_water_heating_overlay.py @@ -49,6 +49,30 @@ def test_water_heating_systems_decode_to_their_codes( assert simulation.heating.water_heating_fuel == fuel +@pytest.mark.parametrize( + ("water_heating_value", "code", "fuel"), + [ + ("From main system, oil", 901, 28), + ("From main system, LPG (bulk)", 901, 27), + ("From main system, bottled LPG", 901, 3), + ("From main system, house coal", 901, 33), + # "boiler/circulator for water heating only" is SAP Table 4a code 911. + ("Gas boiler/circulator, mains gas", 911, 26), + ], +) +def test_more_water_heating_combos_decode_to_their_codes( + water_heating_value: str, code: int, fuel: int +) -> None: + # Act + simulation = water_heating_overlay_for(water_heating_value, 0) + + # Assert + assert simulation is not None + assert simulation.heating is not None + assert simulation.heating.water_heating_code == code + assert simulation.heating.water_heating_fuel == fuel + + @pytest.mark.parametrize("water_heating_value", ["Unknown", ""]) def test_unresolvable_water_heating_produces_no_overlay( water_heating_value: str,