mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Pin synthesised SapFloorDimension total area and heat-loss perimeter as regression tests 🟩
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8a909dc15b
commit
76d07dba39
1 changed files with 17 additions and 0 deletions
|
|
@ -800,3 +800,20 @@ class TestFullSapSchema16xNoFloorDimensions:
|
|||
|
||||
# Act / Assert
|
||||
assert len(main_part.sap_floor_dimensions) == 1
|
||||
|
||||
def test_synthesised_floor_dimension_total_area(self, epc: EpcPropertyData) -> None:
|
||||
# Arrange
|
||||
fd = epc.sap_building_parts[0].sap_floor_dimensions[0]
|
||||
|
||||
# Act / Assert
|
||||
assert fd.total_floor_area_m2 == 72.0
|
||||
|
||||
def test_synthesised_floor_dimension_heat_loss_perimeter(
|
||||
self, epc: EpcPropertyData
|
||||
) -> None:
|
||||
# Arrange: both sap_walls are wall_type=2 (exposed): 43.2 + 3.88 = 47.08 m².
|
||||
# total_height falls back to 1.0 (no storey heights lodged), so perimeter = 47.08 m.
|
||||
fd = epc.sap_building_parts[0].sap_floor_dimensions[0]
|
||||
|
||||
# Act / Assert
|
||||
assert fd.heat_loss_perimeter_m == pytest.approx(47.08)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue