MCPcopy
hub / github.com/dask/dask / _test

Function _test

dask/tests/test_delayed.py:944–962  ·  view source on GitHub ↗
(c, s, *workers)

Source from the content-addressed store, hash-verified

942
943 @gen_cluster(client=True)
944 async def _test(c, s, *workers):
945 test_df = dd.from_dict(
946 {
947 "partition": [0, 1, 2, 3, 0, 1, 2, 3],
948 "value": [1, 2, 3, 4, 5, 6, 7, 8],
949 },
950 npartitions=2,
951 )
952 part_df = test_df.shuffle("partition", force=True, shuffle_method="p2p")
953
954 @delayed
955 def delayed_func(x):
956 return x
957
958 delay_df = delayed_func(part_df)
959 dd.utils.assert_eq(
960 await c.gather(c.compute(delay_df)),
961 await c.gather(c.compute(part_df)),
962 )
963
964 _test()

Callers 1

test_p2p_as_delayedFunction · 0.70

Calls 4

delayed_funcFunction · 0.70
from_dictMethod · 0.45
shuffleMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…