From 25c3f0b2a0248aebf3425eb41d29311c0a8446fe Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 14 Jul 2026 22:28:10 +0000 Subject: [PATCH] =?UTF-8?q?Bill=20room-in-roof=20surfaces=20with=20the=20s?= =?UTF-8?q?urveyed=20roof=20insulation,=20stud-wall=20commons=20?= =?UTF-8?q?=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) --- .../epc/domain/tests/test_from_site_notes.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/datatypes/epc/domain/tests/test_from_site_notes.py b/datatypes/epc/domain/tests/test_from_site_notes.py index 58956d9a8..5c8d18233 100644 --- a/datatypes/epc/domain/tests/test_from_site_notes.py +++ b/datatypes/epc/domain/tests/test_from_site_notes.py @@ -167,16 +167,30 @@ class TestRoomInRoofMapping: assert rir.construction_age_band == "B" surfaces = rir.detailed_surfaces assert surfaces is not None + # Common walls lodge as Detailed-mode stud walls (Table 17 col 3) — + # "common_wall" is a §3.9.2 Simplified-Type-2-only concept; every + # worksheet-validated Detailed fixture uses stud_wall for this low + # internal wall. kinds_areas = [(s.kind, round(s.area_m2, 2)) for s in surfaces] assert kinds_areas == [ ("gable_wall_external", round(6.64 * 2.74, 2)), ("gable_wall", round(6.64 * 2.74, 2)), ("slope", round(4.94 * 1.73, 2)), ("slope", round(5.0 * 2.95, 2)), - ("common_wall", round(4.94 * 1.45, 2)), - ("common_wall", round(4.94 * 1.3, 2)), + ("stud_wall", round(4.94 * 1.45, 2)), + ("stud_wall", round(4.94 * 1.3, 2)), ("flat_ceiling", round(4.94 * 5.17, 2)), ] + # PasHub lodges roof insulation once at roof-space level (the fixture's + # "Joists"/100mm) — thread it into the roof-going surfaces so they + # aren't billed at the Table 18 "unknown" full-uninsulated default + # while the same survey says the roof is insulated. Gables keep None + # (walls — insulation described by the wall fields, not the loft). + by_kind = {s.kind: s.insulation_thickness_mm for s in surfaces} + assert by_kind["slope"] == 100 + assert by_kind["stud_wall"] == 100 + assert by_kind["flat_ceiling"] == 100 + assert by_kind["gable_wall"] is None def test_no_rooms_in_roof_stays_absent(self) -> None: # Arrange — the fixture as lodged (rooms_in_roof=false).