set up testing framework

This commit is contained in:
Khalim Conn-Kowlessar 2023-06-23 10:38:54 +01:00
parent 7dbeffe8c4
commit 4f74f9d8b0
3 changed files with 28 additions and 0 deletions

View file

@ -187,6 +187,9 @@ wall_parts = external_wall_insulation_parts + internal_wall_insulation_parts
class WallRecommendations(BaseUtility):
YEAR_WALLS_BUILT_WITH_INSULATION = 1990
# After 1930, Solid brick walls became less populate and instead, cavity walls became a
# more popular choice
YEARS_CAVITY_WALLS_BEGAN = 1930
U_VALUE_UNIT = 'w/m-¦k'
# TODO: REVIEW THESE FIGURES: RETROFIT ACADEMY COUSE INDICATED THAT IT SHOULD BE 0.3
BUILDING_REGULATIONS_PART_L_MAX_U_VALUE = 0.18

Binary file not shown.

View file

@ -0,0 +1,25 @@
import os
import pytest
import pickle
from model_data.recommendations.WallRecommendations import WallRecommendations
class TestWallRecommendations:
@pytest.fixture
def input_properties(self):
with open(
os.path.abspath(os.path.dirname(__file__)) + "/test_data/input_properties.pkl", "rb"
) as f:
return pickle.load(f)
@pytest.fixture
def uvalue_estimates(self):
with open(
os.path.abspath(os.path.dirname(__file__)) + "/test_data/uvalue_estimates_walls.pkl", "rb"
) as f:
return pickle.load(f)
def test_nothing(self, input_properties, uvalue_estimates):
assert input_properties
assert uvalue_estimates