Carry a flat roof's known insulation depth into the overlay 🟥

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-01 10:13:31 +00:00
parent a8821c9cdb
commit 736b5877e9

View file

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