From 736b5877e944104f6a3a12816d4aaf786e626805 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 1 Jul 2026 10:13:31 +0000 Subject: [PATCH] =?UTF-8?q?Carry=20a=20flat=20roof's=20known=20insulation?= =?UTF-8?q?=20depth=20into=20the=20overlay=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_roof_type_overlay.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/domain/epc/test_roof_type_overlay.py b/tests/domain/epc/test_roof_type_overlay.py index 050d76fa2..75aab9204 100644 --- a/tests/domain/epc/test_roof_type_overlay.py +++ b/tests/domain/epc/test_roof_type_overlay.py @@ -42,6 +42,20 @@ def test_each_loft_depth_is_parsed(roof_type_value: str, expected_mm: int) -> No ].roof_insulation_thickness == expected_mm +def test_flat_roof_depth_maps_to_roof_insulation_thickness() -> None: + # Act — a flat roof with a known depth. RdSAP 10 Table 16 col (1) scores flat + # roofs by insulation thickness ("joists at ceiling level and flat roof"), so + # the depth must reach the overlay, not be discarded for the age-band default + # (ADR-0041). + simulation = roof_overlay_for("Flat, 150 mm insulation", 0) + + # Assert — the flat shape and the real depth both ride on the overlay. + assert simulation is not None + overlay = simulation.building_parts[BuildingPartIdentifier.MAIN] + assert overlay.roof_construction_type == "Flat" + assert overlay.roof_insulation_thickness == 150 + + @pytest.mark.parametrize( "roof_type_value", [