mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
updating floor area unit tests
This commit is contained in:
parent
aa97c77747
commit
5f0c0e7726
1 changed files with 17 additions and 41 deletions
|
|
@ -359,60 +359,36 @@ def test_park_home():
|
|||
) == 0
|
||||
|
||||
|
||||
def test_esimtate_pitched_roof_area():
|
||||
roof_area1 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=100, floor_height=2
|
||||
def test_estimate_pitched_roof_area():
|
||||
roof_area0 = recommendation_utils.estimate_pitched_roof_area(
|
||||
floor_area=80,
|
||||
)
|
||||
assert np.isclose(roof_area0, 97.65333333333334)
|
||||
|
||||
roof_area1 = recommendation_utils.estimate_pitched_roof_area(
|
||||
floor_area=100,
|
||||
)
|
||||
|
||||
assert np.isclose(roof_area1, 107.70329614269008)
|
||||
assert np.isclose(roof_area1, 122.06666666666666)
|
||||
|
||||
# As the floor height gets bigger, the area should get bigger
|
||||
roof_area2 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=100, floor_height=3
|
||||
roof_area2 = recommendation_utils.estimate_pitched_roof_area(
|
||||
floor_area=45,
|
||||
)
|
||||
|
||||
assert np.isclose(roof_area2, 116.61903789690601)
|
||||
assert np.isclose(roof_area2, 54.93)
|
||||
|
||||
# As the floor area gets smaller, the area should get smaller
|
||||
roof_area3 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=100, floor_height=1
|
||||
roof_area3 = recommendation_utils.estimate_pitched_roof_area(
|
||||
floor_area=60,
|
||||
)
|
||||
|
||||
assert np.isclose(roof_area3, 101.9803902718557)
|
||||
assert np.isclose(roof_area3, 73.24)
|
||||
|
||||
# As the floor area decreases, area should decrease
|
||||
roof_area4 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=50, floor_height=2
|
||||
)
|
||||
|
||||
assert np.isclose(roof_area4, 57.44562646538029)
|
||||
|
||||
# As the floor area increases, area should increase
|
||||
roof_area5 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=150, floor_height=2
|
||||
)
|
||||
|
||||
assert np.isclose(roof_area5, 157.797338380595)
|
||||
|
||||
zero_roof_area = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=0, floor_height=1000
|
||||
zero_roof_area = recommendation_utils.estimate_pitched_roof_area(
|
||||
floor_area=0,
|
||||
)
|
||||
|
||||
assert zero_roof_area == 0
|
||||
|
||||
# If the floor height zero, we don't have a traingle, it's a flat roof
|
||||
flat_roof_area = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=1000, floor_height=0
|
||||
)
|
||||
|
||||
assert flat_roof_area == 1000
|
||||
|
||||
zero_roof_area2 = recommendation_utils.esimtate_pitched_roof_area(
|
||||
floor_area=0, floor_height=0
|
||||
)
|
||||
|
||||
assert zero_roof_area2 == 0
|
||||
|
||||
|
||||
def test_external_wall_area():
|
||||
# Arrange: Define the test cases
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue