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"],