()
| 538 | |
| 539 | |
| 540 | def 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") |