Skip to content

Commit

Permalink
Fix broken groupby test
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego committed Jan 30, 2023
1 parent 6632e40 commit 56379bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py-polars/tests/unit/test_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np
import pandas as pd
import pytest
from _pytest.monkeypatch import MonkeyPatch

import polars as pl
from polars.testing import assert_frame_equal
Expand Down Expand Up @@ -138,8 +138,9 @@ def test_maintain_order_after_sampling() -> None:
) == {"type": ["A", "B", "C", "D"], "value": [5, 8, 5, 7]}


@pytest.mark.xfail(reason="Currently bugged, see issue #6556")
def test_sorted_groupby_optimization() -> None:
def test_sorted_groupby_optimization(monkeypatch: MonkeyPatch) -> None:
monkeypatch.setenv("POLARS_NO_STREAMING_GROUPBY", "1")

df = pl.DataFrame({"a": np.random.randint(0, 5, 20)})

# the sorted optimization should not randomize the
Expand Down

0 comments on commit 56379bf

Please sign in to comment.