()
| 5134 | |
| 5135 | |
| 5136 | def test_to_backend(): |
| 5137 | # Test that `DataFrame.to_backend` works as expected |
| 5138 | with dask.config.set({"dataframe.backend": "pandas"}): |
| 5139 | # Start with pandas-backed data |
| 5140 | df = dd.from_dict({"a": range(10)}, npartitions=2) |
| 5141 | assert isinstance(df._meta, pd.DataFrame) |
| 5142 | |
| 5143 | # Default `to_backend` shouldn't change data |
| 5144 | assert_eq(df, df.to_backend()) |
| 5145 | |
| 5146 | # Moving to a "missing" backend should raise an error |
| 5147 | with pytest.raises(ValueError, match="No backend dispatch registered"): |
| 5148 | df.to_backend("missing") |
| 5149 | |
| 5150 | |
| 5151 | @pytest.mark.parametrize("func", ["max", "sum"]) |
nothing calls this directly
no test coverage detected