Skip to content

Commit 895f0b4

Browse files
authored
Skipt failing tests for numpy dev (#40877)
* Skipt failing tests for numpy dev * Add missed test to skip * Change if condition
1 parent 80217cf commit 895f0b4

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

pandas/tests/arrays/boolean/test_arithmetic.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ def test_div(left_array, right_array):
6969
@pytest.mark.parametrize(
7070
"opname",
7171
[
72-
"floordiv",
72+
pytest.param(
73+
"floordiv",
74+
marks=pytest.mark.xfail(reason="NumpyDev GH#40874", strict=False),
75+
),
7376
"mod",
7477
pytest.param(
7578
"pow", marks=pytest.mark.xfail(reason="TODO follow int8 behaviour? GH34686")

pandas/tests/arrays/masked/test_arithmetic.py

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import numpy as np
77
import pytest
88

9+
from pandas.compat import is_numpy_dev
10+
911
import pandas as pd
1012
import pandas._testing as tm
1113
from pandas.core.arrays import ExtensionArray
@@ -52,6 +54,8 @@ def test_array_scalar_like_equivalence(data, all_arithmetic_operators):
5254
def test_array_NA(data, all_arithmetic_operators):
5355
if "truediv" in all_arithmetic_operators:
5456
pytest.skip("division with pd.NA raises")
57+
if "floordiv" in all_arithmetic_operators and is_numpy_dev:
58+
pytest.skip("NumpyDev behavior GH#40874")
5559
data, _ = data
5660
op = tm.get_op_from_name(all_arithmetic_operators)
5761
check_skip(data, all_arithmetic_operators)

pandas/tests/extension/test_boolean.py

+22
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import numpy as np
1717
import pytest
1818

19+
from pandas.compat import is_numpy_dev
20+
1921
import pandas as pd
2022
import pandas._testing as tm
2123
from pandas.core.arrays.boolean import BooleanDtype
@@ -140,6 +142,26 @@ def _check_op(self, obj, op, other, op_name, exc=NotImplementedError):
140142
with pytest.raises(exc):
141143
op(obj, other)
142144

145+
def test_arith_series_with_scalar(self, data, all_arithmetic_operators):
146+
if "floordiv" in all_arithmetic_operators and is_numpy_dev:
147+
pytest.skip("NumpyDev behavior GH#40874")
148+
super().test_arith_series_with_scalar(data, all_arithmetic_operators)
149+
150+
def test_arith_frame_with_scalar(self, data, all_arithmetic_operators):
151+
if "floordiv" in all_arithmetic_operators and is_numpy_dev:
152+
pytest.skip("NumpyDev behavior GH#40874")
153+
super().test_arith_frame_with_scalar(data, all_arithmetic_operators)
154+
155+
def test_arith_series_with_array(self, data, all_arithmetic_operators):
156+
if "floordiv" in all_arithmetic_operators and is_numpy_dev:
157+
pytest.skip("NumpyDev behavior GH#40874")
158+
super().test_arith_series_with_scalar(data, all_arithmetic_operators)
159+
160+
def test_divmod_series_array(self, data, data_for_twos):
161+
if is_numpy_dev:
162+
pytest.skip("NumpyDev behavior GH#40874")
163+
super().test_divmod_series_array(data, data_for_twos)
164+
143165
def _check_divmod_op(self, s, op, other, exc=None):
144166
# override to not raise an error
145167
super()._check_divmod_op(s, op, other, None)

0 commit comments

Comments
 (0)