mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Decode from-main oil/LPG/coal and gas boiler-circulator water heating 🟥
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
21bb55f414
commit
49f783de45
1 changed files with 24 additions and 0 deletions
|
|
@ -49,6 +49,30 @@ def test_water_heating_systems_decode_to_their_codes(
|
||||||
assert simulation.heating.water_heating_fuel == fuel
|
assert simulation.heating.water_heating_fuel == fuel
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
("water_heating_value", "code", "fuel"),
|
||||||
|
[
|
||||||
|
("From main system, oil", 901, 28),
|
||||||
|
("From main system, LPG (bulk)", 901, 27),
|
||||||
|
("From main system, bottled LPG", 901, 3),
|
||||||
|
("From main system, house coal", 901, 33),
|
||||||
|
# "boiler/circulator for water heating only" is SAP Table 4a code 911.
|
||||||
|
("Gas boiler/circulator, mains gas", 911, 26),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_more_water_heating_combos_decode_to_their_codes(
|
||||||
|
water_heating_value: str, code: int, fuel: int
|
||||||
|
) -> None:
|
||||||
|
# Act
|
||||||
|
simulation = water_heating_overlay_for(water_heating_value, 0)
|
||||||
|
|
||||||
|
# Assert
|
||||||
|
assert simulation is not None
|
||||||
|
assert simulation.heating is not None
|
||||||
|
assert simulation.heating.water_heating_code == code
|
||||||
|
assert simulation.heating.water_heating_fuel == fuel
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize("water_heating_value", ["Unknown", ""])
|
@pytest.mark.parametrize("water_heating_value", ["Unknown", ""])
|
||||||
def test_unresolvable_water_heating_produces_no_overlay(
|
def test_unresolvable_water_heating_produces_no_overlay(
|
||||||
water_heating_value: str,
|
water_heating_value: str,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue