Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Aug 29, 2023
1 parent 10cac24 commit e18580d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pandas/tests/groupby/test_groupby_shift_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ def test_group_shift_with_multiple_periods_and_both_fill_and_freq_fails():
{"a": [1, 2, 3, 4, 5], "b": [True, True, False, False, True]},
index=date_range("1/1/2000", periods=5, freq="H"),
)
msg = r"Cannot pass both 'freq' and 'fill_value' to.*"
with pytest.raises(ValueError, match=msg):
msg = (
"Passing a 'freq' together with a 'fill_value' silently ignores the "
"fill_value"
)
with tm.assert_produces_warning(FutureWarning, match=msg):
df.groupby("b")[["a"]].shift([1, 2], fill_value=1, freq="H")

0 comments on commit e18580d

Please sign in to comment.