From 141cc59816068d1c7947fbadfbd927d5dd276f8d Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Tue, 20 Feb 2024 16:58:50 +0000 Subject: [PATCH 1/3] Fix sort_values pytest failure --- python/cudf/cudf/tests/test_sorting.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python/cudf/cudf/tests/test_sorting.py b/python/cudf/cudf/tests/test_sorting.py index dd545da4243..1e184d4bac4 100644 --- a/python/cudf/cudf/tests/test_sorting.py +++ b/python/cudf/cudf/tests/test_sorting.py @@ -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 from cudf.core.column import NumericalColumn from cudf.testing._utils import ( DATETIME_TYPES, @@ -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, + 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]} From cb2e1e69de2bdd067270c1d8ed669a1bbf1a9ca1 Mon Sep 17 00:00:00 2001 From: GALI PREM SAGAR Date: Tue, 20 Feb 2024 13:14:38 -0600 Subject: [PATCH 2/3] Update python/cudf/cudf/tests/test_sorting.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --- python/cudf/cudf/tests/test_sorting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cudf/cudf/tests/test_sorting.py b/python/cudf/cudf/tests/test_sorting.py index 1e184d4bac4..67e82fa9ceb 100644 --- a/python/cudf/cudf/tests/test_sorting.py +++ b/python/cudf/cudf/tests/test_sorting.py @@ -51,7 +51,7 @@ def test_dataframe_sort_values(nelem, dtype): 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, + PANDAS_GE_220 and isinstance(index, list) and not ignore_index, reason="https://github.com/pandas-dev/pandas/issues/57531", ) ) From ada376e291c224f394974d00454df85a022838a5 Mon Sep 17 00:00:00 2001 From: GALI PREM SAGAR Date: Tue, 20 Feb 2024 13:41:06 -0600 Subject: [PATCH 3/3] Update python/cudf/cudf/tests/test_sorting.py --- python/cudf/cudf/tests/test_sorting.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/cudf/cudf/tests/test_sorting.py b/python/cudf/cudf/tests/test_sorting.py index 67e82fa9ceb..b3ecb471bb9 100644 --- a/python/cudf/cudf/tests/test_sorting.py +++ b/python/cudf/cudf/tests/test_sorting.py @@ -8,7 +8,7 @@ import pytest from cudf import DataFrame, Series -from cudf.core._compat import PANDAS_GE_200 +from cudf.core._compat import PANDAS_GE_220 from cudf.core.column import NumericalColumn from cudf.testing._utils import ( DATETIME_TYPES,