mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
set up testing framework
This commit is contained in:
parent
7dbeffe8c4
commit
4f74f9d8b0
3 changed files with 28 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
BIN
model_data/tests/test_data/input_properties.pkl
Normal file
BIN
model_data/tests/test_data/input_properties.pkl
Normal file
Binary file not shown.
25
model_data/tests/test_wall_recommendations.py
Normal file
25
model_data/tests/test_wall_recommendations.py
Normal 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
|
||||
Loading…
Add table
Reference in a new issue