MCPcopy
hub / github.com/dask/dask / test_to_backend

Function test_to_backend

dask/dataframe/tests/test_dataframe.py:5118–5130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5116
5117
5118def 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"])

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
setMethod · 0.80
from_dictMethod · 0.45
to_backendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…