Skip to content
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

xfail tests in test_udf_masked_ops due to pandas 2.2 bug #15071

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 17 additions & 1 deletion python/cudf/cudf/tests/test_udf_masked_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from numba import cuda

import cudf
from cudf.core._compat import PANDAS_GE_220
from cudf.core.missing import NA
from cudf.core.udf._ops import (
arith_ops,
Expand Down Expand Up @@ -482,6 +483,9 @@ def func(x):
run_masked_udf_series(func, data, check_dtype=False)


@pytest.mark.xfail(
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
)
def test_series_apply_null_conditional():
def func(x):
if x is NA:
Expand All @@ -506,6 +510,9 @@ def func(x):
run_masked_udf_series(func, data, check_dtype=False)


@pytest.mark.xfail(
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
)
@pytest.mark.parametrize("op", comparison_ops)
def test_series_compare_masked_vs_masked(op):
"""
Expand Down Expand Up @@ -562,6 +569,9 @@ def func(x):
run_masked_udf_series(func, data, check_dtype=False)


@pytest.mark.xfail(
PANDAS_GE_220, reason="https://github.com/pandas-dev/pandas/issues/57390"
)
def test_series_masked_is_null_conditional():
def func(x):
if x is NA:
Expand Down Expand Up @@ -742,8 +752,14 @@ def func(x, c):
],
)
@pytest.mark.parametrize("op", arith_ops + comparison_ops)
def test_masked_udf_scalar_args_binops_multiple_series(data, op):
def test_masked_udf_scalar_args_binops_multiple_series(request, data, op):
data = cudf.Series(data)
request.applymarker(
pytest.mark.xfail(
op in comparison_ops and PANDAS_GE_220 and data.dtype.kind != "b",
reason="https://github.com/pandas-dev/pandas/issues/57390",
)
)

def func(data, c, k):
x = op(data, c)
Expand Down