Skip to content

Commit

Permalink
Update unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-mosteiro committed Nov 12, 2019
1 parent c73a586 commit 7f1348d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cea/demand/schedule_maker/schedule_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def schedule_maker_main(locator, config, building=None):

if buildings == []:
buildings = locator.get_zone_building_names()
if building !=None:
if building != None:
buildings = [building] #this is to run the tests

# get variables of indoor comfort and internal loads
Expand Down
2 changes: 1 addition & 1 deletion cea/tests/create_unittest_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main(output_file):
print("data for test_calc_thermal_loads:")
print(building_properties.list_building_names())

schedule_maker_main(locator, config, building='B01')
schedule_maker_main(locator, config, building=None)

bpr = building_properties['B01']
result = calc_thermal_loads('B01', bpr, weather_data, date_range, locator,
Expand Down
3 changes: 2 additions & 1 deletion cea/tests/test_calc_thermal_loads.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ value_columns = ["E_sys_kWh", "Qcdata_sys_kWh", "Qcre_sys_kWh", "Qcs_sys_kWh", "
values = [397332.706, 0.0, 0.0, 54493.56, 96284.527, 19784.978, 0.0, 0.0, 26186.16, 0.0, 0.0, 171600.0]

[test_calc_thermal_loads_other_buildings]
results = {"B01": [95850.97399999999, 54619.37700000001, 19784.981], "B03": [61035.076, 105109.26800000001, 117428.346], "B02": [298794.787, 25824.404000000002, 312646.881], "B05": [127637.944, 0.0, 73558.87800000001], "B04": [152702.88799999998, 36399.451, 17519.632], "B07": [158006.793, 48285.737, 31350.191000000003], "B06": [65923.814, 79359.823, 168328.89299999998], "B09": [135996.991, 18248.393, 15160.830999999998], "B08": [164461.95099999997, 27726.712999999996, 400112.111]}
results = {"B01": [96284.527, 54493.56, 19784.978], "B03": [61270.984, 103288.264, 117428.537], "B02": [299345.566, 25872.039, 312647.82999999996], "B05": [127871.16, 0.0, 73559.536], "B04": [153030.22400000002, 36404.417, 17519.653000000002], "B07": [158375.001, 46013.644, 31350.313], "B06": [66140.078, 80270.72899999999, 168329.153], "B09": [136263.101, 18254.959000000003, 15161.161], "B08": [164841.764, 27644.819, 400112.534]}

0 comments on commit 7f1348d

Please sign in to comment.