Skip to content

TST: strictify xfails in sparse tests #39445

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 1 commit into from
Jan 28, 2021
Merged
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
16 changes: 11 additions & 5 deletions pandas/tests/arrays/sparse/test_arithmetics.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,13 @@ def test_float_scalar(

if not np_version_under1p20:
if op in [operator.floordiv, ops.rfloordiv]:
mark = pytest.mark.xfail(strict=False, reason="GH#38172")
request.node.add_marker(mark)
if op is operator.floordiv and scalar != 0:
pass
elif op is ops.rfloordiv and scalar == 0:
pass
else:
mark = pytest.mark.xfail(reason="GH#38172")
request.node.add_marker(mark)

values = self._base([np.nan, 1, 2, 0, np.nan, 0, 1, 2, 1, np.nan])

Expand Down Expand Up @@ -170,9 +175,10 @@ def test_float_same_index_with_nans(
op = all_arithmetic_functions

if not np_version_under1p20:
if op in [operator.floordiv, ops.rfloordiv]:
mark = pytest.mark.xfail(strict=False, reason="GH#38172")
request.node.add_marker(mark)
if op is ops.rfloordiv:
if not (mix and kind == "block"):
mark = pytest.mark.xfail(reason="GH#38172")
request.node.add_marker(mark)

values = self._base([np.nan, 1, 2, 0, np.nan, 0, 1, 2, 1, np.nan])
rvalues = self._base([np.nan, 2, 3, 4, np.nan, 0, 1, 3, 2, np.nan])
Expand Down