Skip to content

Commit

Permalink
Add test for warnings when infer_last_interval is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
p-snft committed Dec 22, 2023
1 parent ea7c62b commit 270594b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_time_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ def test_energysystem_with_datetimeindex():
assert es.timeincrement.sum() == 23


def test_energysystem_with_datetimeindex():
datetimeindex = pd.date_range("1/1/2012", periods=24, freq="H")
with pytest.warns(FutureWarning):
_ = solph.EnergySystem(timeindex=datetimeindex)


def test_energysystem_with_datetimeindex_non_equidistant_infer_last_interval():
"""Test EnergySystem with DatetimeIndex (non-equidistant)"""
dtindex1 = pd.date_range("1/1/2012", periods=24, freq="H")
Expand Down

0 comments on commit 270594b

Please sign in to comment.