Skip to content

Commit

Permalink
Removes duplicated test in test_schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelduchesne committed Jan 24, 2020
1 parent 644711b commit 1e0c1ce
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions tests/test_schedules.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,40 +81,6 @@ def schedules_idf():
]


def test_ep_versus_schedule(test_data):
"""Main test. Will run the idf using EnergyPlus, retrieve the csv file,
create the schedules and compare"""

orig, new, expected = test_data

# slice_ = ('2018/01/01 00:00', '2018/01/08 00:00') # first week
# slice_ = ('2018/05/20 12:00', '2018/05/22 12:00')
slice_ = ("2018/04/30 12:00", "2018/05/02 12:00") # Holiday
# slice_ = ('2018/01/01 00:00', '2018/12/31 23:00') # all year
# slice_ = ('2018/04/30 12:00', '2018/05/01 12:00') # break

mask = expected.values != orig.all_values
diff = mask.sum()

# # region Plot
# fig, ax = plt.subplots(1, 1, figsize=(5, 4))
# orig.plot(slice=slice_, ax=ax, legend=True, drawstyle='steps-post',
# linestyle='dashed')
# new.plot(slice=slice_, ax=ax, legend=True, drawstyle='steps-post',
# linestyle='dotted')
# expected.loc[slice_[0]:slice_[1]].plot(label='E+', legend=True, ax=ax,
# drawstyle='steps-post',
# linestyle='dashdot')
# ax.set_title(orig.Name.capitalize())
# plt.show()
# # endregion

print(diff)
print(orig.series[mask])
assert (orig.all_values[0 : 52 * 7 * 24] == expected[0 : 52 * 7 * 24]).all()
assert (new.all_values[0 : 52 * 7 * 24] == expected[0 : 52 * 7 * 24]).all()


@pytest.fixture(params=schedules, ids=ids)
def test_schedules(request, run_schedules_idf):
"""Create the test_data"""
Expand Down

0 comments on commit 1e0c1ce

Please sign in to comment.