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

Function _test

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

Source from the content-addressed store, hash-verified

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