From 7a99c7eccb756a719d6da87fe62b33a46075b277 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 14:08:30 +0000 Subject: [PATCH] =?UTF-8?q?Electric=20boiler=20overrides=20no=20longer=20l?= =?UTF-8?q?og=20an=20incomplete=20companion=20set=20=F0=9F=9F=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- .../epc/test_main_heating_system_overlay.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/domain/epc/test_main_heating_system_overlay.py b/tests/domain/epc/test_main_heating_system_overlay.py index 07171cfca..b42effd9b 100644 --- a/tests/domain/epc/test_main_heating_system_overlay.py +++ b/tests/domain/epc/test_main_heating_system_overlay.py @@ -457,6 +457,24 @@ def test_electric_boiler_overlays_the_boiler_category( assert simulation.heating.main_heating_category == 2 +@pytest.mark.parametrize( + "main_heating_value", + ["Direct-acting electric", "Electric boiler", "Electric CPSU"], +) +def test_complete_electric_boiler_overlay_does_not_log_a_companion_gap( + main_heating_value: str, caplog: pytest.LogCaptureFixture +) -> None: + # Electric boilers now resolve a full companion set (category 2 + control + # 2101, ADR-0052), so the overlay must NOT log an incomplete-companion gap + # — guarding that the set stays complete. + # Act + with caplog.at_level(logging.ERROR): + main_heating_overlay_for(main_heating_value, 0) + + # Assert + assert "incomplete companion set" not in caplog.text + + @pytest.mark.parametrize( "main_heating_value", ["Direct-acting electric", "Electric boiler", "Electric CPSU"],