Skip to content

Commit

Permalink
Update file structure for heat test files
Browse files Browse the repository at this point in the history
  • Loading branch information
timtroendle committed Jul 3, 2024
1 parent 6648952 commit 29c3fb0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/model/timeseries/demand/test_heat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def test_unscaled_heat(unscaled_space_heat_timeseries):
"""Expecting more space heating demand in winter than summer."""
# xarray to pandas as we need a newer xarray version (with flox) for `groupby` performance.
df = unscaled_space_heat_timeseries.space_heat.to_series()
hourly_space_monthly = df.groupby(df.index.get_level_values("time").month).sum()
hourly_space_winter = hourly_space_monthly.loc[[12, 1, 2]].sum()
hourly_space_summer = hourly_space_monthly.loc[[6, 7, 8]].sum()
assert (hourly_space_winter > hourly_space_summer).all()
File renamed without changes.

0 comments on commit 29c3fb0

Please sign in to comment.