Update old test · pandas-dev/pandas@c92a4a8 (original) (raw)
File tree
1 file changed
lines changed
- pandas/tests/extension/decimal
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -252,9 +252,14 @@ def test_arith_series_with_array(self, data, all_arithmetic_operators): | ||
252 | 252 | context.traps[decimal.DivisionByZero] = divbyzerotrap |
253 | 253 | context.traps[decimal.InvalidOperation] = invalidoptrap |
254 | 254 | |
255 | -@pytest.mark.skip(reason="divmod not appropriate for decimal") | |
256 | 255 | 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) | |
258 | 263 | |
259 | 264 | def test_error(self): |
260 | 265 | pass |