Skip to content

Commit

Permalink
test: xfail polars>1.7.0 Expr.mode with broadcast (#953)
Browse files Browse the repository at this point in the history
* fix: xfail polars expr mode

* use parse_version
  • Loading branch information
FBruzzesi authored Sep 12, 2024
1 parent 421d58b commit a3b6a75
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/expr_and_series/mode_test.py
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -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")
Expand Down

0 comments on commit a3b6a75

Please sign in to comment.