From e89f5a3a5c308fabaa643a3ae871847ac3438df1 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 23 Jul 2026 13:25:07 +0000 Subject: [PATCH] =?UTF-8?q?Defer=20an=20as-built=20sloping-ceiling=20overr?= =?UTF-8?q?ide=20to=20the=20age-band=20default=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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/domain/epc/test_roof_type_overlay.py b/tests/domain/epc/test_roof_type_overlay.py index 1c39ec9f7..aab9f9cd7 100644 --- a/tests/domain/epc/test_roof_type_overlay.py +++ b/tests/domain/epc/test_roof_type_overlay.py @@ -160,6 +160,24 @@ def test_pitched_unknown_loft_drives_the_pitched_age_band_default() -> None: assert overlay.roof_insulation_thickness is None +def test_sloping_ceiling_as_built_defers_to_the_age_band_default() -> None: + # ADR-0066: a pitched sloping ceiling has no loft void, so "as built" defers + # the U-value to the construction age band (Table 18 col (3) via the + # calculator's `is_pitched_sloping_ceiling`). The calculator keys the sloping + # path on "sloping ceiling" in `roof_construction_type`, so the overlay sets + # that shape and leaves thickness None for the age band to drive — never the + # loft ladder. + + # Act + simulation = roof_overlay_for("Pitched, sloping ceiling, as built", 0) + + # Assert + assert simulation is not None + overlay = simulation.building_parts[BuildingPartIdentifier.MAIN] + assert overlay.roof_construction_type == "Pitched, sloping ceiling" + assert overlay.roof_insulation_thickness is None + + @pytest.mark.parametrize( "roof_type_value", [