Skip to content

Commit 0a3310b

Browse files
committed
TST: Test Series integer mod behavior on string
Closes pandas-dev#24396
1 parent 30362ed commit 0a3310b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/series/test_operators.py

+10
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,16 @@ def test_divmod(self):
878878
assert_series_equal(result[0], expected[0])
879879
assert_series_equal(result[1], expected[1])
880880

881+
@pytest.mark.parametrize("index", [None, range(9)])
882+
def test_series_integer_mod(self, index):
883+
s1 = Series(range(1, 10))
884+
s2 = Series("foo", index=index)
885+
886+
msg = "not all arguments converted during string formatting"
887+
888+
with pytest.raises(TypeError, match=msg):
889+
s2 % s1
890+
881891

882892
class TestSeriesUnaryOps:
883893
# __neg__, __pos__, __inv__

0 commit comments

Comments
 (0)