(self_destruct)
| 5251 | |
| 5252 | @pytest.mark.parametrize("self_destruct", [True, False]) |
| 5253 | def test_pyarrow_conversion_dispatch(self_destruct): |
| 5254 | from dask.dataframe.dispatch import ( |
| 5255 | from_pyarrow_table_dispatch, |
| 5256 | to_pyarrow_table_dispatch, |
| 5257 | ) |
| 5258 | |
| 5259 | pytest.importorskip("pyarrow") |
| 5260 | |
| 5261 | df1 = pd.DataFrame(np.random.randn(10, 3), columns=list("abc")) |
| 5262 | df1["d"] = pd.Series(["cat", "dog"] * 5, dtype="string[pyarrow]") |
| 5263 | df2 = from_pyarrow_table_dispatch( |
| 5264 | df1, |
| 5265 | to_pyarrow_table_dispatch(df1), |
| 5266 | self_destruct=self_destruct, |
| 5267 | ) |
| 5268 | |
| 5269 | assert type(df1) == type(df2) |
| 5270 | assert_eq(df1, df2) |
| 5271 | |
| 5272 | |
| 5273 | @pytest.mark.gpu |
nothing calls this directly
no test coverage detected