Skip to content

Commit

Permalink
fix python test
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Aug 10, 2024
1 parent 450cecf commit 37e848d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/vegafusion/tests/test_pretransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -1585,10 +1585,12 @@ def test_nat_values():


def test_pre_transform_dataset_dataframe_interface_protocol():

try:
import pyarrow.interchange
except ImportError:
pytest.skip("DataFrame interface protocol requires pyarrow 11.0.0 or later")
from polars.testing import assert_frame_equal

n = 4050
# Input a polars DataFrame (which follows the DataFrame Interface Protocol)
Expand All @@ -1612,7 +1614,7 @@ def test_pre_transform_dataset_dataframe_interface_protocol():
# Result should be a polars DataFrame
assert isinstance(result, pl.DataFrame)
expected = pl.DataFrame({"menu_item": [0, 1, 2], "__count": [n, 2 * n, 3 * n]})
assert result.frame_equal(expected)
assert_frame_equal(result, expected)


def test_pre_transform_dataset_duckdb_conn():
Expand Down

0 comments on commit 37e848d

Please sign in to comment.