mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Resolve every party-ceiling marker variant to its member 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
87d0cc41ab
commit
7f00ee69e1
1 changed files with 24 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from domain.epc.property_overrides.roof_type import RoofType
|
||||
from domain.epc.property_overrides.roof_party_ceiling_guard import (
|
||||
roof_party_ceiling_guard,
|
||||
|
|
@ -16,3 +18,25 @@ def test_party_ceiling_marker_with_a_trailing_depth_resolves_to_the_party_ceilin
|
|||
|
||||
# Assert — it is a party ceiling (~0 heat loss), not a Pitched roof.
|
||||
assert result is RoofType.ADJACENT_ANOTHER_DWELLING_ABOVE
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("description", "expected"),
|
||||
[
|
||||
("same dwelling above: unknown", RoofType.ADJACENT_SAME_DWELLING_ABOVE),
|
||||
("other premises above", RoofType.ADJACENT_OTHER_PREMISES_ABOVE),
|
||||
("another premises above: 150mm", RoofType.ADJACENT_ANOTHER_PREMISES_ABOVE),
|
||||
# the unspaced source form and the "Another Premises Above" member value
|
||||
# both normalise to the same marker.
|
||||
("Another Premises Above", RoofType.ADJACENT_ANOTHER_PREMISES_ABOVE),
|
||||
("samedwellingabove: 300mm", RoofType.ADJACENT_SAME_DWELLING_ABOVE),
|
||||
],
|
||||
)
|
||||
def test_every_party_ceiling_marker_variant_resolves_to_its_member(
|
||||
description: str, expected: RoofType
|
||||
) -> None:
|
||||
# Act
|
||||
result = roof_party_ceiling_guard(description)
|
||||
|
||||
# Assert
|
||||
assert result is expected
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue