mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
17 lines
683 B
Python
17 lines
683 B
Python
import pytest
|
|
from epc_data.attributes.attribute_utils import extract_thermal_transmittence, search_split_description
|
|
|
|
|
|
def test__extract_thermal_transmittence():
|
|
description = "U-value of 2.3 w/m-¦k"
|
|
assert extract_thermal_transmittence(description) == (2.3, "w/m-¦k")
|
|
|
|
|
|
def test__search_split_roof_description():
|
|
assert search_split_description("insulated") == "average"
|
|
assert search_split_description("limited") == "below average"
|
|
assert search_split_description("no insulation") == "none"
|
|
assert search_split_description("limited insulation") == "below average"
|
|
|
|
with pytest.raises(NotImplementedError):
|
|
search_split_description("unknown")
|