Skip to content

Commit d50c910

Browse files
authored
xfail tests in test_udf_masked_ops due to pandas 2.2 bug (#15071)
Due to a change in pandas 2.2 with how NA is handled (incorrectly) in UDFs pandas-dev/pandas#57390 Authors: - Matthew Roeschke (https://github.com/mroeschke) Approvers: - GALI PREM SAGAR (https://github.com/galipremsagar) URL: #15071
1 parent 193ab6e commit d50c910

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

python/cudf/cudf/tests/test_udf_masked_ops.py

+17-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from numba import cuda
88

99
import cudf
10+
from cudf.core._compat import PANDAS_GE_220
1011
from cudf.core.missing import NA
1112
from cudf.core.udf._ops import (
1213
arith_ops,
@@ -482,6 +483,9 @@ def func(x):
482483
run_masked_udf_series(func, data, check_dtype=False)
483484

484485

486+
@pytest.mark.xfail(
487+
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
488+
)
485489
def test_series_apply_null_conditional():
486490
def func(x):
487491
if x is NA:
@@ -506,6 +510,9 @@ def func(x):
506510
run_masked_udf_series(func, data, check_dtype=False)
507511

508512

513+
@pytest.mark.xfail(
514+
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
515+
)
509516
@pytest.mark.parametrize("op", comparison_ops)
510517
def test_series_compare_masked_vs_masked(op):
511518
"""
@@ -562,6 +569,9 @@ def func(x):
562569
run_masked_udf_series(func, data, check_dtype=False)
563570

564571

572+
@pytest.mark.xfail(
573+
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
574+
)
565575
def test_series_masked_is_null_conditional():
566576
def func(x):
567577
if x is NA:
@@ -742,8 +752,14 @@ def func(x, c):
742752
],
743753
)
744754
@pytest.mark.parametrize("op", arith_ops + comparison_ops)
745-
def test_masked_udf_scalar_args_binops_multiple_series(data, op):
755+
def test_masked_udf_scalar_args_binops_multiple_series(request, data, op):
746756
data = cudf.Series(data)
757+
request.applymarker(
758+
pytest.mark.xfail(
759+
op in comparison_ops and PANDAS_GE_220 and data.dtype.kind != "b",
760+
reason="https://github.com/pandas-dev/pandas/issues/57390",
761+
)
762+
)
747763

748764
def func(data, c, k):
749765
x = op(data, c)

0 commit comments

Comments
 (0)