Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jim Crist-Harif <jcristharif@gmail.com>
  • Loading branch information
cpcloud and jcrist authored Sep 23, 2024
1 parent 27c4458 commit 53592a8
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions ibis/backends/polars/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,14 @@ def test_memtable_polars_types(con):
@pytest.mark.parametrize("to_method", ["to_pyarrow", "to_polars"])
def test_streaming(con, mocker, to_method):
t = con.table("functional_alltypes")
to_method_spy = mocker.spy(con, to_method)
mocked_collect = mocker.patch("polars.LazyFrame.collect")
getattr(con, to_method)(t, streaming=True)
to_method_spy.assert_called_once_with(t, streaming=True)
mocked_collect.assert_called_once_with(streaming=True, engine="cpu")


@pytest.mark.parametrize("to_method", ["to_pyarrow", "to_polars"])
def test_engine(con, mocker, to_method):
t = con.table("functional_alltypes")
to_method_spy = mocker.spy(con, to_method)
mocked_collect = mocker.patch("polars.LazyFrame.collect")
getattr(con, to_method)(t, engine="gpu")
to_method_spy.assert_called_once_with(t, engine="gpu")
mocked_collect.assert_called_once_with(streaming=False, engine="gpu")

0 comments on commit 53592a8

Please sign in to comment.