Skip to content

TST: stricten xfails #38927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ def test_frame_with_frame_reindex(self):
(np.datetime64(20, "ns"), "<M8[ns]"),
],
)
@pytest.mark.xfail(reason="GH38630", strict=False)
@pytest.mark.parametrize(
"op",
[
Expand All @@ -835,9 +834,12 @@ def test_frame_with_frame_reindex(self):
ids=lambda x: x.__name__,
)
def test_binop_other(self, op, value, dtype):

skip = {
(operator.truediv, "bool"),
(operator.pow, "bool"),
(operator.add, "bool"),
(operator.mul, "bool"),
}

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

elif (op, dtype) in skip:

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

else:
msg = "operator '.*' not implemented for .* dtypes"
with pytest.raises(NotImplementedError, match=msg):
with tm.assert_produces_warning(UserWarning):
# "evaluating in Python space because ..."
op(s, e.value)

else:
# FIXME: Since dispatching to Series, this test no longer
# asserts anything meaningful
Expand Down
7 changes: 1 addition & 6 deletions pandas/tests/indexes/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@
from pandas import (
CategoricalIndex,
DatetimeIndex,
Int64Index,
MultiIndex,
PeriodIndex,
RangeIndex,
TimedeltaIndex,
UInt64Index,
)
import pandas._testing as tm

Expand Down Expand Up @@ -371,12 +369,9 @@ def test_ravel_deprecation(self, index):
with tm.assert_produces_warning(FutureWarning):
index.ravel()

@pytest.mark.xfail(reason="GH38630", strict=False)
def test_asi8_deprecation(self, index):
# GH#37877
if isinstance(
index, (Int64Index, UInt64Index, DatetimeIndex, TimedeltaIndex, PeriodIndex)
):
if isinstance(index, (DatetimeIndex, TimedeltaIndex, PeriodIndex)):
warn = None
else:
warn = FutureWarning
Expand Down