Skip to content

Commit

Permalink
test: Fix tests for pyarrow 14 (pola-rs#12170)
Browse files Browse the repository at this point in the history
  • Loading branch information
stinodego authored Nov 1, 2023
1 parent 309414e commit 3d07ccc
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 0 additions & 5 deletions py-polars/tests/unit/interchange/test_from_dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ def test_from_dataframe_data_type_not_implemented_by_arrow(
pl.from_dataframe(dfi)


# Remove xfail marker when the issue is fixed:
# https://github.com/apache/arrow/issues/37050
@pytest.mark.xfail(
reason="Bug in pyarrow's implementation of the interchange protocol."
)
def test_from_dataframe_empty_arrow_interchange_object() -> None:
df = pl.Series("a", dtype=pl.Int8).to_frame()
df_pa = df.to_arrow()
Expand Down
6 changes: 0 additions & 6 deletions py-polars/tests/unit/interchange/test_roundtrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,6 @@ def test_roundtrip_pandas_boolean_subchunks() -> None:
assert_frame_equal(result, df)


# Remove xfail marker when support is implemented,
# or we write our own `from_dataframe` implementation.
# https://github.com/apache/arrow/issues/33982#issuecomment-1669278644
@pytest.mark.xfail(
reason="Boolean support not yet implemented in pyarrow's implementation of `from_dataframe`."
)
def test_roundtrip_pyarrow_boolean() -> None:
df = pl.Series("a", [True, False], dtype=pl.Boolean).to_frame()
dfi = df.__dataframe__()
Expand Down
2 changes: 1 addition & 1 deletion py-polars/tests/unit/test_interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ def test_upcast_pyarrow_dicts() -> None:
for i in range(128)
]

tbl = pa.concat_tables(tbls, promote=True)
tbl = pa.concat_tables(tbls, promote_options="default")
out = cast(pl.DataFrame, pl.from_arrow(tbl))
assert out.shape == (128, 1)
assert out["col_name"][0] == "value_0"
Expand Down

0 comments on commit 3d07ccc

Please sign in to comment.