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

Function test_custom_delayed

dask/tests/test_delayed.py:540–546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

538
539
540def test_custom_delayed():
541 x = Tuple({"a": 1, "b": 2, "c": (add, "a", "b")}, ["a", "b", "c"])
542 x2 = delayed(add, pure=True)(x, (4, 5, 6))
543 n = delayed(len, pure=True)(x)
544 assert delayed(len, pure=True)(x).key == n.key
545 assert x2.compute() == (1, 2, 3, 4, 5, 6)
546 assert compute(n, x2, x) == (3, (1, 2, 3, 4, 5, 6), (1, 2, 3))
547
548
549@pytest.mark.filterwarnings("ignore:The dask.delayed:UserWarning")

Callers

nothing calls this directly

Calls 4

delayedFunction · 0.90
computeFunction · 0.90
TupleClass · 0.70
computeMethod · 0.45

Tested by

no test coverage detected