From da4aec984000630375135181dac3d3a80db6cb3e Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 3 Jul 2026 11:41:56 +0000 Subject: [PATCH] =?UTF-8?q?Treatable=20old-band=20solid=20walls=20keep=20t?= =?UTF-8?q?heir=20EWI=20and=20IWI=20options=20under=20the=20gate=20?= =?UTF-8?q?=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 --- .../modelling/test_wall_recommendation.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/domain/modelling/test_wall_recommendation.py b/tests/domain/modelling/test_wall_recommendation.py index 993d7a856..4734314c9 100644 --- a/tests/domain/modelling/test_wall_recommendation.py +++ b/tests/domain/modelling/test_wall_recommendation.py @@ -130,6 +130,29 @@ def test_at_regs_age_band_wall_yields_no_solid_wall_recommendation() -> None: assert recommendation is None +def test_treatable_old_band_solid_wall_keeps_its_insulation_options() -> None: + # Arrange — solid brick as-built at age band B: the cascade U (~2.1) far + # exceeds what 100 mm EWI/IWI achieves, so the Wall U-Value Gate must let + # both Options through unchanged (the gate is physical possibility only — + # ADR-0051). + baseline: EpcPropertyData = build_epc() # age band B + main: SapBuildingPart = _part(baseline, BuildingPartIdentifier.MAIN) + main.wall_construction = 3 # solid brick — EWI + IWI constructable + main.wall_insulation_type = 4 + + # Act + recommendation: Recommendation | None = recommend_solid_wall( + baseline, _StubProducts() + ) + + # Assert + assert recommendation is not None + assert {option.measure_type for option in recommendation.options} == { + "external_wall_insulation", + "internal_wall_insulation", + } + + def test_park_home_wall_yields_no_solid_wall_recommendation() -> None: # Arrange — a park home (wall_construction code 8) with an uninsulated # as-built wall. Code 8 is NOT system-built (ADR-0019); a park home's