MCPcopy Create free account
hub / github.com/dask/dask / test_from_delayed_optimizing

Function test_from_delayed_optimizing

dask/dataframe/dask_expr/io/tests/test_delayed.py:14–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13
14def test_from_delayed_optimizing():
15 parts = from_dict({"a": np.arange(300)}, npartitions=30).to_delayed()
16 result = from_delayed(parts[0], meta=pd.DataFrame({"a": pd.Series(dtype=np.int64)}))
17 # +1 due to an Alias for correct naming
18 assert len(result.optimize().dask) == 3
19 assert_eq(result, pd.DataFrame({"a": pd.Series(np.arange(10))}))
20
21
22@pytest.mark.parametrize("prefix", [None, "foo"])

Callers

nothing calls this directly

Calls 6

from_dictFunction · 0.90
from_delayedFunction · 0.90
assert_eqFunction · 0.90
to_delayedMethod · 0.45
arangeMethod · 0.45
optimizeMethod · 0.45

Tested by

no test coverage detected