mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Synthesise reduced-field windows for RdSAP-Schema-17.0 certs 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
26651ca71c
commit
887af58a25
1 changed files with 19 additions and 0 deletions
|
|
@ -96,3 +96,22 @@ def test_rdsap_19_0_synthesises_windows_for_windowless_cert() -> None:
|
|||
|
||||
# Assert — N, E, S, W (SAP orientation codes 1, 3, 5, 7)
|
||||
assert [w.orientation for w in result.sap_windows] == [1, 3, 5, 7]
|
||||
|
||||
|
||||
def test_rdsap_17_0_synthesises_windows_for_windowless_cert() -> None:
|
||||
"""ADR-0028 Reduced-Field Synthesis: a reduced 17.0 cert lodges no
|
||||
per-window geometry, only a glazed_area band — the mapper synthesises a
|
||||
4-way N/E/S/W split rather than leaving the dwelling windowless."""
|
||||
# Arrange — a band-1 cert with no lodged sap_windows array
|
||||
certs = _load("RdSAP-Schema-17.0")
|
||||
if not certs:
|
||||
pytest.skip("no RdSAP-Schema-17.0 corpus harvested")
|
||||
cert = next(
|
||||
c for c in certs if c.get("glazed_area") == 1 and not c.get("sap_windows")
|
||||
)
|
||||
|
||||
# Act
|
||||
result = EpcPropertyDataMapper.from_api_response(cert)
|
||||
|
||||
# Assert — N, E, S, W (SAP orientation codes 1, 3, 5, 7)
|
||||
assert [w.orientation for w in result.sap_windows] == [1, 3, 5, 7]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue