Skip to content

Commit bdff214

Browse files
authored
TST: fix xfails/skips (#44706)
1 parent b4187ff commit bdff214

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

pandas/core/computation/expressions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ def _evaluate_numexpr(op, op_str, a, b):
144144
roperator.rfloordiv: None,
145145
# we require Python semantics for mod of negative for backwards compatibility
146146
# see https://github.com/pydata/numexpr/issues/365
147-
# so sticking with unaccelerated for now
147+
# so sticking with unaccelerated for now GH#36552
148148
operator.mod: None,
149-
roperator.rmod: "%",
149+
roperator.rmod: None,
150150
operator.pow: "**",
151151
roperator.rpow: "**",
152152
operator.eq: "==",

pandas/tests/scalar/timedelta/test_arithmetic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,6 @@ def test_compare_td64_ndarray(self):
981981
result = arr != td
982982
tm.assert_numpy_array_equal(result, ~expected)
983983

984-
@pytest.mark.skip(reason="GH#20829 is reverted until after 0.24.0")
985984
def test_compare_custom_object(self):
986985
"""
987986
Make sure non supported operations on Timedelta returns NonImplemented

pandas/tests/test_expressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def test_frame_series_axis(self, axis, arith):
372372
"op",
373373
[
374374
"__mod__",
375-
pytest.param("__rmod__", marks=pytest.mark.xfail(reason="GH-36552")),
375+
"__rmod__",
376376
"__floordiv__",
377377
"__rfloordiv__",
378378
],

pandas/tests/test_nanops.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ def check_fun_data(
156156
else:
157157
targ = targfunc(targartempval, axis=axis, **kwargs)
158158

159+
if targartempval.dtype == object and (
160+
targfunc is np.any or targfunc is np.all
161+
):
162+
# GH#12863 the numpy functions will retain e.g. floatiness
163+
if isinstance(targ, np.ndarray):
164+
targ = targ.astype(bool)
165+
else:
166+
targ = bool(targ)
167+
159168
res = testfunc(testarval, axis=axis, skipna=skipna, **kwargs)
160169
self.check_results(targ, res, axis, check_dtype=check_dtype)
161170
if skipna:
@@ -270,7 +279,6 @@ def _badobj_wrap(self, value, func, allow_complex=True, **kwargs):
270279
value = value.astype("f8")
271280
return func(value, **kwargs)
272281

273-
@pytest.mark.xfail(reason="GH12863: numpy result won't match for object type")
274282
@pytest.mark.parametrize(
275283
"nan_op,np_op", [(nanops.nanany, np.any), (nanops.nanall, np.all)]
276284
)

0 commit comments

Comments
 (0)