Treatable old-band solid walls keep their EWI and IWI options under the gate 🟩

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Khalim Conn-Kowlessar 2026-07-03 11:41:56 +00:00
parent 7a039d30bc
commit da4aec9840

View file

@ -130,6 +130,29 @@ def test_at_regs_age_band_wall_yields_no_solid_wall_recommendation() -> None:
assert recommendation is None
def test_treatable_old_band_solid_wall_keeps_its_insulation_options() -> None:
# Arrange — solid brick as-built at age band B: the cascade U (~2.1) far
# exceeds what 100 mm EWI/IWI achieves, so the Wall U-Value Gate must let
# both Options through unchanged (the gate is physical possibility only —
# ADR-0051).
baseline: EpcPropertyData = build_epc() # age band B
main: SapBuildingPart = _part(baseline, BuildingPartIdentifier.MAIN)
main.wall_construction = 3 # solid brick — EWI + IWI constructable
main.wall_insulation_type = 4
# Act
recommendation: Recommendation | None = recommend_solid_wall(
baseline, _StubProducts()
)
# Assert
assert recommendation is not None
assert {option.measure_type for option in recommendation.options} == {
"external_wall_insulation",
"internal_wall_insulation",
}
def test_park_home_wall_yields_no_solid_wall_recommendation() -> None:
# Arrange — a park home (wall_construction code 8) with an uninsulated
# as-built wall. Code 8 is NOT system-built (ADR-0019); a park home's