From e56f91d761062d8a219b2d51c5d0e49b2cbedfab Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli Date: Mon, 6 Jan 2025 10:15:30 +0000 Subject: [PATCH] test: catch some cudf failures (#1735) --- pyproject.toml | 1 + tests/expr_and_series/clip_test.py | 3 +++ tests/expr_and_series/lit_test.py | 6 +++++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 43a1dbc12..daa21c3ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -187,6 +187,7 @@ omit = [ exclude_also = [ "if sys.version_info() <", "if .*implementation is Implementation.CUDF", + "if .*implementation.is_cudf", 'request.applymarker\(pytest.mark.xfail', 'backend_version <', 'if "cudf" in str\(constructor' diff --git a/tests/expr_and_series/clip_test.py b/tests/expr_and_series/clip_test.py index 29ed6379b..2ae9e043d 100644 --- a/tests/expr_and_series/clip_test.py +++ b/tests/expr_and_series/clip_test.py @@ -28,6 +28,9 @@ def test_clip_expr_expressified( ) -> None: if "modin_pyarrow" in str(constructor): request.applymarker(pytest.mark.xfail) + if "cudf" in str(constructor): + # https://github.com/rapidsai/cudf/issues/17682 + request.applymarker(pytest.mark.xfail) data = {"a": [1, 2, 3, -4, 5], "lb": [3, 2, 1, 1, 1], "ub": [4, 4, 2, 2, 2]} df = nw.from_native(constructor(data)) diff --git a/tests/expr_and_series/lit_test.py b/tests/expr_and_series/lit_test.py index f5be7dfbe..501bfc4bd 100644 --- a/tests/expr_and_series/lit_test.py +++ b/tests/expr_and_series/lit_test.py @@ -108,4 +108,8 @@ def test_date_lit(constructor: Constructor, request: pytest.FixtureRequest) -> N request.applymarker(pytest.mark.xfail) df = nw.from_native(constructor({"a": [1]})) result = df.with_columns(nw.lit(date(2020, 1, 1), dtype=nw.Date)).collect_schema() - assert result == {"a": nw.Int64, "literal": nw.Date} + if df.implementation.is_cudf(): + # cudf has no date dtype + assert result == {"a": nw.Int64, "literal": nw.Datetime} + else: + assert result == {"a": nw.Int64, "literal": nw.Date}