Skip to content

Commit 428ba13

Browse files
committed
add test
1 parent 88ea9cb commit 428ba13

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/series/methods/test_round.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,10 @@ def test_round_ea_boolean(self):
7272
tm.assert_series_equal(result, expected)
7373
result.iloc[0] = False
7474
tm.assert_series_equal(ser, expected)
75+
76+
def test_round_dtype_object(self):
77+
ser = Series([0.2], dtype="object")
78+
msg = "Expected numeric dtype, got object instead."
79+
with pytest.raises(TypeError, match=msg):
80+
ser.round()
81+

0 commit comments

Comments
 (0)