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

Function test_convert_resolve

dask/tests/test_task_spec.py:618–637  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

616
617
618def test_convert_resolve():
619 dsk = {
620 "first": (func, 10),
621 "second": "first",
622 "third": (func, "second"),
623 "fourth": "third",
624 "fifth": (func, "fourth"),
625 }
626 dsk = convert_and_verify_keys(dsk)
627 assert len(dsk) == 5
628
629 optimized = resolve_aliases(dsk, {"fifth"}, reverse_dict(DependenciesMapping(dsk)))
630 assert len(optimized) == 3
631 expected = dsk["third"].copy()
632 expected.key = "fourth"
633 assert optimized["fourth"] == expected
634
635 expected = dsk["first"].copy()
636 expected.key = "second"
637 assert optimized["second"] == expected
638
639
640def test_parse_nested():

Callers

nothing calls this directly

Calls 5

resolve_aliasesFunction · 0.90
reverse_dictFunction · 0.90
DependenciesMappingClass · 0.90
convert_and_verify_keysFunction · 0.85
copyMethod · 0.45

Tested by

no test coverage detected