()
| 5116 | |
| 5117 | |
| 5118 | def test_to_backend(): |
| 5119 | # Test that `DataFrame.to_backend` works as expected |
| 5120 | with dask.config.set({"dataframe.backend": "pandas"}): |
| 5121 | # Start with pandas-backed data |
| 5122 | df = dd.from_dict({"a": range(10)}, npartitions=2) |
| 5123 | assert isinstance(df._meta, pd.DataFrame) |
| 5124 | |
| 5125 | # Default `to_backend` shouldn't change data |
| 5126 | assert_eq(df, df.to_backend()) |
| 5127 | |
| 5128 | # Moving to a "missing" backend should raise an error |
| 5129 | with pytest.raises(ValueError, match="No backend dispatch registered"): |
| 5130 | df.to_backend("missing") |
| 5131 | |
| 5132 | |
| 5133 | @pytest.mark.parametrize("func", ["max", "sum"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…