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

Fix sort_values pytest failure with pandas-2.x regression #15092

Merged
merged 5 commits into from
Feb 20, 2024
Merged
Changes from 2 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
12 changes: 7 additions & 5 deletions python/cudf/cudf/tests/test_sorting.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

from cudf import DataFrame, Series
from cudf.core._compat import PANDAS_GE_220
from cudf.core._compat import PANDAS_GE_200
galipremsagar marked this conversation as resolved.
Show resolved Hide resolved
from cudf.core.column import NumericalColumn
from cudf.testing._utils import (
DATETIME_TYPES,
Expand Down Expand Up @@ -48,11 +48,13 @@ def test_dataframe_sort_values(nelem, dtype):

@pytest.mark.parametrize("ignore_index", [True, False])
@pytest.mark.parametrize("index", ["a", "b", ["a", "b"]])
def test_dataframe_sort_values_ignore_index(index, ignore_index):
if not PANDAS_GE_220 and isinstance(index, list) and not ignore_index:
pytest.skip(
reason="TODO: Remove this once pandas-2.2 support is added",
def test_dataframe_sort_values_ignore_index(request, index, ignore_index):
request.applymarker(
pytest.mark.xfail(
PANDAS_GE_200 and isinstance(index, list) and not ignore_index,
galipremsagar marked this conversation as resolved.
Show resolved Hide resolved
reason="https://github.com/pandas-dev/pandas/issues/57531",
)
)

gdf = DataFrame(
{"a": [1, 3, 5, 2, 4], "b": [1, 1, 2, 2, 3], "c": [9, 7, 7, 7, 1]}
Expand Down
Loading