From 4d0c1608edc2c1f3707445e9f99f67b1261fa32e Mon Sep 17 00:00:00 2001 From: GALI PREM SAGAR Date: Wed, 3 Mar 2021 17:30:04 -0600 Subject: [PATCH] xfail failing pytest in pandas 1.2.3 (#7507) Looks like a new patch to the version of `1.2` was released(`1.2.3`) and this breaks one of our pytest. xfailing that pytest for `1.2.3`. Authors: - GALI PREM SAGAR (@galipremsagar) Approvers: - Christopher Harris (@cwharris) - AJ Schmidt (@ajschmidt8) - Keith Kraus (@kkraus14) URL: https://github.com/rapidsai/cudf/pull/7507 --- python/cudf/cudf/core/_compat.py | 1 + python/cudf/cudf/tests/test_setitem.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/cudf/cudf/core/_compat.py b/python/cudf/cudf/core/_compat.py index 0fedfcabb46..807e96f2c38 100644 --- a/python/cudf/cudf/core/_compat.py +++ b/python/cudf/cudf/core/_compat.py @@ -7,3 +7,4 @@ PANDAS_GE_100 = PANDAS_VERSION >= version.parse("1.0") PANDAS_GE_110 = PANDAS_VERSION >= version.parse("1.1") PANDAS_GE_120 = PANDAS_VERSION >= version.parse("1.2") +PANDAS_EQ_123 = PANDAS_VERSION == version.parse("1.2.3") diff --git a/python/cudf/cudf/tests/test_setitem.py b/python/cudf/cudf/tests/test_setitem.py index fc885a13808..4d2e2a4b33b 100644 --- a/python/cudf/cudf/tests/test_setitem.py +++ b/python/cudf/cudf/tests/test_setitem.py @@ -5,7 +5,7 @@ import pytest import cudf -from cudf.core._compat import PANDAS_GE_120 +from cudf.core._compat import PANDAS_EQ_123, PANDAS_GE_120 from cudf.tests.utils import assert_eq, assert_exceptions_equal @@ -21,9 +21,8 @@ def test_dataframe_setitem_bool_mask_scaler(df, arg, value): @pytest.mark.xfail( - condition=not PANDAS_GE_120, - reason="pandas incorrectly adds nulls with dataframes " - "but works fine with scalars", + condition=PANDAS_EQ_123 or not PANDAS_GE_120, + reason="https://github.com/pandas-dev/pandas/issues/40204", ) def test_dataframe_setitem_scaler_bool(): df = pd.DataFrame({"a": [1, 2, 3]})