Skip to content

Commit c92a4a8

Browse files
committed
Update old test
1 parent 52538fa commit c92a4a8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pandas/tests/extension/decimal/test_decimal.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,14 @@ def test_arith_series_with_array(self, data, all_arithmetic_operators):
252252
context.traps[decimal.DivisionByZero] = divbyzerotrap
253253
context.traps[decimal.InvalidOperation] = invalidoptrap
254254

255-
@pytest.mark.skip(reason="divmod not appropriate for decimal")
256255
def test_divmod(self, data):
257-
pass
256+
s = pd.Series(data, name='name')
257+
a, b = divmod(s, 2)
258+
ea, eb = zip(*(divmod(x, 2) for x in s))
259+
ea = pd.Series(ea, name=s.name, dtype=s.dtype)
260+
eb = pd.Series(eb, name=s.name, dtype=s.dtype)
261+
tm.assert_series_equal(a, ea)
262+
tm.assert_series_equal(b, eb)
258263

259264
def test_error(self):
260265
pass

0 commit comments

Comments
 (0)