Defer an as-built sloping-ceiling override to the age-band default 🟥

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-23 13:25:07 +00:00
parent bec6e17347
commit e89f5a3a5c

View file

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