diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 49e4b7cbf..1222fe1d9 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -65,7 +65,12 @@ jobs: matrix: python-version: ["3.11", "3.13"] os: [ubuntu-latest] + include: + - python-version: "3.11" + polars_streaming: true runs-on: ${{ matrix.os }} + env: + NARWHALS_POLARS_NEW_STREAMING: ${{ matrix.polars_streaming == true }} steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/tests/utils.py b/tests/utils.py index 16581431c..947db4edb 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -96,11 +96,13 @@ def assert_equal_data(result: Any, expected: dict[str, Any]) -> None: if is_duckdb: result = from_native(result.to_native().arrow()) if hasattr(result, "collect"): - kwargs = { - Implementation.POLARS: ( - {"engine": "gpu"} if os.environ.get("NARWHALS_POLARS_GPU", False) else {} - ) # pragma: no cover - } + kwargs: dict[Implementation, dict[str, Any]] = {Implementation.POLARS: {}} + + if os.environ.get("NARWHALS_POLARS_GPU", False): # pragma: no cover + kwargs[Implementation.POLARS].update({"engine": "gpu"}) + if os.environ.get("NARWHALS_POLARS_NEW_STREAMING", False): # pragma: no cover + kwargs[Implementation.POLARS].update({"new_streaming": True}) + result = result.collect(**kwargs.get(result.implementation, {})) if hasattr(result, "columns"):