()
| 5217 | |
| 5218 | |
| 5219 | def test_pyarrow_schema_dispatch(): |
| 5220 | from dask.dataframe.dispatch import ( |
| 5221 | pyarrow_schema_dispatch, |
| 5222 | to_pyarrow_table_dispatch, |
| 5223 | ) |
| 5224 | |
| 5225 | pytest.importorskip("pyarrow") |
| 5226 | |
| 5227 | df = pd.DataFrame(np.random.randn(10, 3), columns=list("abc")) |
| 5228 | df["d"] = pd.Series(["cat", "dog"] * 5, dtype="string[pyarrow]") |
| 5229 | table = to_pyarrow_table_dispatch(df) |
| 5230 | schema = pyarrow_schema_dispatch(df) |
| 5231 | |
| 5232 | assert schema.equals(table.schema) |
| 5233 | |
| 5234 | |
| 5235 | @pytest.mark.parametrize("preserve_index", [True, False]) |
nothing calls this directly
no outgoing calls
no test coverage detected