mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Pin band-2 glazing scaling at x1.25 for 18.0 certs 🟩
Behaviour delivered by the band-multiplier dict in the prior slice; this pins
the band-2 ("More than typical") case against the inherited 20.0.0 coefficient.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e0ff02b1ac
commit
42f02f33d8
1 changed files with 28 additions and 0 deletions
|
|
@ -1525,3 +1525,31 @@ class TestRdSap18_0ReducedFieldSynthesis:
|
|||
assert sorted(w.orientation for w in result.sap_windows) == [1, 3, 5, 7]
|
||||
total_area = sum(w.window_width * w.window_height for w in result.sap_windows)
|
||||
assert total_area == pytest.approx(0.148 * tfa)
|
||||
|
||||
def test_band_more_than_typical_scales_glazing_by_1_25(self) -> None:
|
||||
# Arrange — ADR-0028: the glazed_area band scales synthesised area off the
|
||||
# Normal ratio. Band 2 ("More than typical") = 1.25, the inherited 20.0.0
|
||||
# multiplier (18.0's 26 band-2 windowless certs can't re-fit it — no
|
||||
# measured band-2 windows — so it is reused, not re-derived). A band-2
|
||||
# cert with no per-window array.
|
||||
corpus = _load_18_0_corpus()
|
||||
if not corpus:
|
||||
pytest.skip("no RdSAP-Schema-18.0 corpus harvested")
|
||||
cert = next(
|
||||
(
|
||||
c
|
||||
for c in corpus
|
||||
if not c.get("sap_windows") and c.get("glazed_area") == 2
|
||||
),
|
||||
None,
|
||||
)
|
||||
if cert is None:
|
||||
pytest.skip("no band-2 corpus cert without sap_windows")
|
||||
tfa = float(cert["total_floor_area"])
|
||||
|
||||
# Act
|
||||
result = EpcPropertyDataMapper.from_api_response(cert)
|
||||
|
||||
# Assert
|
||||
total_area = sum(w.window_width * w.window_height for w in result.sap_windows)
|
||||
assert total_area == pytest.approx(0.148 * tfa * 1.25)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue