Skip to content

Commit f0f7fe9

Browse files
jbrockmendelluckyvs1
authored andcommitted
TST: stricten xfails (pandas-dev#38927)
1 parent f7d3e9e commit f0f7fe9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

pandas/tests/frame/test_arithmetic.py

+11-3
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,6 @@ def test_frame_with_frame_reindex(self):
821821
(np.datetime64(20, "ns"), "<M8[ns]"),
822822
],
823823
)
824-
@pytest.mark.xfail(reason="GH38630", strict=False)
825824
@pytest.mark.parametrize(
826825
"op",
827826
[
@@ -835,9 +834,12 @@ def test_frame_with_frame_reindex(self):
835834
ids=lambda x: x.__name__,
836835
)
837836
def test_binop_other(self, op, value, dtype):
837+
838838
skip = {
839839
(operator.truediv, "bool"),
840840
(operator.pow, "bool"),
841+
(operator.add, "bool"),
842+
(operator.mul, "bool"),
841843
}
842844

843845
e = DummyElement(value, dtype)
@@ -879,12 +881,18 @@ def test_binop_other(self, op, value, dtype):
879881

880882
elif (op, dtype) in skip:
881883

882-
msg = "operator '.*' not implemented for .* dtypes"
883-
with pytest.raises(NotImplementedError, match=msg):
884+
if op in [operator.add, operator.mul]:
884885
with tm.assert_produces_warning(UserWarning):
885886
# "evaluating in Python space because ..."
886887
op(s, e.value)
887888

889+
else:
890+
msg = "operator '.*' not implemented for .* dtypes"
891+
with pytest.raises(NotImplementedError, match=msg):
892+
with tm.assert_produces_warning(UserWarning):
893+
# "evaluating in Python space because ..."
894+
op(s, e.value)
895+
888896
else:
889897
# FIXME: Since dispatching to Series, this test no longer
890898
# asserts anything meaningful

pandas/tests/indexes/test_common.py

+1-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@
1616
from pandas import (
1717
CategoricalIndex,
1818
DatetimeIndex,
19-
Int64Index,
2019
MultiIndex,
2120
PeriodIndex,
2221
RangeIndex,
2322
TimedeltaIndex,
24-
UInt64Index,
2523
)
2624
import pandas._testing as tm
2725

@@ -371,12 +369,9 @@ def test_ravel_deprecation(self, index):
371369
with tm.assert_produces_warning(FutureWarning):
372370
index.ravel()
373371

374-
@pytest.mark.xfail(reason="GH38630", strict=False)
375372
def test_asi8_deprecation(self, index):
376373
# GH#37877
377-
if isinstance(
378-
index, (Int64Index, UInt64Index, DatetimeIndex, TimedeltaIndex, PeriodIndex)
379-
):
374+
if isinstance(index, (DatetimeIndex, TimedeltaIndex, PeriodIndex)):
380375
warn = None
381376
else:
382377
warn = FutureWarning

0 commit comments

Comments
 (0)