diff --git a/pandas/tests/arrays/boolean/test_arithmetic.py b/pandas/tests/arrays/boolean/test_arithmetic.py index 01de64568a011..9b854a81f2def 100644 --- a/pandas/tests/arrays/boolean/test_arithmetic.py +++ b/pandas/tests/arrays/boolean/test_arithmetic.py @@ -66,7 +66,10 @@ def test_div(left_array, right_array): @pytest.mark.parametrize( "opname", [ - "floordiv", + pytest.param( + "floordiv", + marks=pytest.mark.xfail(reason="NumpyDev GH#40874", strict=False), + ), "mod", pytest.param( "pow", marks=pytest.mark.xfail(reason="TODO follow int8 behaviour? GH34686") diff --git a/pandas/tests/arrays/masked/test_arithmetic.py b/pandas/tests/arrays/masked/test_arithmetic.py index 148b7092abb56..34686f6052131 100644 --- a/pandas/tests/arrays/masked/test_arithmetic.py +++ b/pandas/tests/arrays/masked/test_arithmetic.py @@ -3,6 +3,8 @@ import numpy as np import pytest +from pandas.compat.numpy import is_numpy_dev + import pandas as pd import pandas._testing as tm from pandas.core.arrays import ExtensionArray @@ -49,6 +51,8 @@ def test_array_scalar_like_equivalence(data, all_arithmetic_operators): def test_array_NA(data, all_arithmetic_operators): if "truediv" in all_arithmetic_operators: pytest.skip("division with pd.NA raises") + if "floordiv" in all_arithmetic_operators and is_numpy_dev: + pytest.skip("NumpyDev behavior GH#40874") data, _ = data op = tm.get_op_from_name(all_arithmetic_operators) check_skip(data, all_arithmetic_operators) diff --git a/pandas/tests/extension/test_boolean.py b/pandas/tests/extension/test_boolean.py index 86a0bc9213256..d15c822f22c14 100644 --- a/pandas/tests/extension/test_boolean.py +++ b/pandas/tests/extension/test_boolean.py @@ -16,6 +16,8 @@ import numpy as np import pytest +from pandas.compat.numpy import is_numpy_dev + import pandas as pd import pandas._testing as tm from pandas.core.arrays.boolean import BooleanDtype @@ -139,6 +141,21 @@ def _check_op(self, s, op, other, op_name, exc=NotImplementedError): with pytest.raises(exc): op(s, other) + def test_arith_series_with_scalar(self, data, all_arithmetic_operators): + if "floordiv" in all_arithmetic_operators and is_numpy_dev: + pytest.skip("NumpyDev behavior GH#40874") + super().test_arith_series_with_scalar(data, all_arithmetic_operators) + + def test_arith_series_with_array(self, data, all_arithmetic_operators): + if "floordiv" in all_arithmetic_operators and is_numpy_dev: + pytest.skip("NumpyDev behavior GH#40874") + super().test_arith_series_with_scalar(data, all_arithmetic_operators) + + def test_divmod_series_array(self, data, data_for_twos): + if is_numpy_dev: + pytest.skip("NumpyDev behavior GH#40874") + super().test_divmod_series_array(data, data_for_twos) + def _check_divmod_op(self, s, op, other, exc=None): # override to not raise an error super()._check_divmod_op(s, op, other, None)