Skip to content

Commit

Permalink
Add check for total demand
Browse files Browse the repository at this point in the history
  • Loading branch information
birgits committed Aug 2, 2024
1 parent ed68214 commit 5fb7d15
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_particular_profiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ def test_simple_profile(self):
# check sum of factors to make sure not only the tested factors are
# correct
assert np.isclose(self.ilp.dataframe["ind"].sum(), 131.8)
# check total demand
assert np.isclose(df.sum(), 1.0)

# ############### test with own values ###############
profile_factors = {
Expand Down Expand Up @@ -109,6 +111,8 @@ def test_simple_profile(self):
# check sum of factors to make sure not only the tested factors are
# correct
assert np.isclose(self.ilp.dataframe["ind"].sum(), 99.2)
# check total demand
assert np.isclose(df.sum(), 1.0)

# ############### test missing profile factors ###############
profile_factors = {
Expand Down Expand Up @@ -167,3 +171,5 @@ def test_simple_profile(self):
# check sum of factors to make sure not only the tested factors are
# correct
assert np.isclose(self.ilp_holiday.dataframe["ind"].sum(), 98.9)
# check total demand
assert np.isclose(df.sum(), 1.0)

0 comments on commit 5fb7d15

Please sign in to comment.