Skip to content

Commit

Permalink
Another regex fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegrabowski committed Sep 23, 2024
1 parent 77baec5 commit ea10465
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/statespace/test_statespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,12 @@ def test_bad_forecast_arguments(use_datetime_index, caplog):
time_idx = _make_time_idx(ss_mod, use_datetime_index)

# Start value not in time index
with pytest.raises(
ValueError, match="Integer start must be in the data index used to fit the model"
):
match = (
"Datetime start must be in the data index used to fit the model"
if use_datetime_index
else "Integer start must be within the range of the data index used to fit the model."
)
with pytest.raises(ValueError, match=match):
start = time_idx.shift(10)[-1] if use_datetime_index else time_idx[-1] + 11
ss_mod._validate_forecast_args(time_index=time_idx, start=start, periods=10)

Expand Down

0 comments on commit ea10465

Please sign in to comment.