Skip to content

Commit 0d780fe

Browse files
committed
fix for local changes
1 parent bed37e7 commit 0d780fe

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/series/methods/test_diff.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22
import pytest
3+
import pandas as pd
34

45
from pandas import (
56
Series,
@@ -89,3 +90,12 @@ def test_diff_object_dtype(self):
8990
result = ser.diff()
9091
expected = ser - ser.shift(1)
9192
tm.assert_series_equal(result, expected)
93+
94+
def test_series_shift_rejects_prefix_suffix():
95+
s = pd.Series([1, 2, 3])
96+
97+
with pytest.raises(ValueError, match="prefix.*DataFrame.shift"):
98+
s.shift(1, prefix="PRE")
99+
100+
with pytest.raises(ValueError, match="suffix.*DataFrame.shift"):
101+
s.shift(1, suffix="POST")

0 commit comments

Comments
 (0)