diff --git a/tests/expr_and_series/mode_test.py b/tests/expr_and_series/mode_test.py index 33a0bef5a..3dd331d29 100644 --- a/tests/expr_and_series/mode_test.py +++ b/tests/expr_and_series/mode_test.py @@ -1,8 +1,10 @@ from typing import Any +import polars as pl import pytest import narwhals.stable.v1 as nw +from narwhals.utils import parse_version from tests.utils import compare_dicts data = { @@ -22,7 +24,9 @@ def test_mode_single_expr(constructor: Any, request: Any) -> None: def test_mode_multi_expr(constructor: Any, request: Any) -> None: - if "dask" in str(constructor): + if "dask" in str(constructor) or ( + "polars" in str(constructor) and parse_version(pl.__version__) >= (1, 7, 0) + ): request.applymarker(pytest.mark.xfail) df = nw.from_native(constructor(data)) result = df.select(nw.col("a", "b").mode()).sort("a", "b")