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