diff --git a/py-polars/tests/unit/streaming/test_streaming_group_by.py b/py-polars/tests/unit/streaming/test_streaming_group_by.py index 1e913684e95a..732c7fdf1787 100644 --- a/py-polars/tests/unit/streaming/test_streaming_group_by.py +++ b/py-polars/tests/unit/streaming/test_streaming_group_by.py @@ -209,16 +209,13 @@ def test_streaming_group_by_ooc_q1( tmp_path: Path, monkeypatch: Any, ) -> None: - s = random_integers - tmp_path.mkdir(exist_ok=True) monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path)) monkeypatch.setenv("POLARS_FORCE_OOC", "1") + lf = random_integers.to_frame().lazy() result = ( - s.to_frame() - .lazy() - .group_by("a") + lf.group_by("a") .agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last")) .sort("a") .collect(streaming=True) @@ -240,17 +237,13 @@ def test_streaming_group_by_ooc_q2( tmp_path: Path, monkeypatch: Any, ) -> None: - s = random_integers - tmp_path.mkdir(exist_ok=True) monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path)) monkeypatch.setenv("POLARS_FORCE_OOC", "1") + lf = random_integers.cast(str).to_frame().lazy() result = ( - s.cast(str) - .to_frame() - .lazy() - .group_by("a") + lf.group_by("a") .agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last")) .sort("a") .collect(streaming=True) @@ -266,22 +259,22 @@ def test_streaming_group_by_ooc_q2( assert_frame_equal(result, expected) +@pytest.mark.skip( + reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526" +) @pytest.mark.write_disk() def test_streaming_group_by_ooc_q3( random_integers: pl.Series, tmp_path: Path, monkeypatch: Any, ) -> None: - s = random_integers - tmp_path.mkdir(exist_ok=True) monkeypatch.setenv("POLARS_TEMP_DIR", str(tmp_path)) monkeypatch.setenv("POLARS_FORCE_OOC", "1") + lf = pl.LazyFrame({"a": random_integers, "b": random_integers}) result = ( - pl.DataFrame({"a": s, "b": s}) - .lazy() - .group_by(["a", "b"]) + lf.group_by("a", "b") .agg(pl.first("a").alias("a_first"), pl.last("a").alias("a_last")) .sort("a") .collect(streaming=True) diff --git a/py-polars/tests/unit/streaming/test_streaming_sort.py b/py-polars/tests/unit/streaming/test_streaming_sort.py index 352b24813fa1..b4d749b1d150 100644 --- a/py-polars/tests/unit/streaming/test_streaming_sort.py +++ b/py-polars/tests/unit/streaming/test_streaming_sort.py @@ -92,6 +92,9 @@ def test_ooc_sort(tmp_path: Path, monkeypatch: Any) -> None: assert_series_equal(out, s.sort(descending=descending)) +@pytest.mark.skip( + reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526" +) @pytest.mark.write_disk() def test_streaming_sort(tmp_path: Path, monkeypatch: Any, capfd: Any) -> None: tmp_path.mkdir(exist_ok=True) @@ -111,6 +114,9 @@ def test_streaming_sort(tmp_path: Path, monkeypatch: Any, capfd: Any) -> None: assert "df -> sort" in err +@pytest.mark.skip( + reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526" +) @pytest.mark.write_disk() def test_out_of_core_sort_9503(tmp_path: Path, monkeypatch: Any) -> None: tmp_path.mkdir(exist_ok=True) @@ -118,7 +124,7 @@ def test_out_of_core_sort_9503(tmp_path: Path, monkeypatch: Any) -> None: monkeypatch.setenv("POLARS_FORCE_OOC", "1") np.random.seed(0) - num_rows = 1_00_000 + num_rows = 100_000 num_columns = 2 num_tables = 10 @@ -169,8 +175,7 @@ def test_out_of_core_sort_9503(tmp_path: Path, monkeypatch: Any) -> None: @pytest.mark.skip( - reason="This test is unreliable - it fails intermittently in our CI" - " with 'OSError: No such file or directory (os error 2)'." + reason="Fails randomly in the CI suite: https://github.com/pola-rs/polars/issues/13526" ) @pytest.mark.write_disk() @pytest.mark.slow()