MCPcopy
hub / github.com/dask/dask / test_dependencies_mapping_doesnt_mutate_task

Function test_dependencies_mapping_doesnt_mutate_task

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

Source from the content-addressed store, hash-verified

758
759
760def test_dependencies_mapping_doesnt_mutate_task():
761
762 t = Task("key", func, "a", "b")
763 t2 = Task("key2", func, "a", t.ref())
764
765 assert t2.dependencies == {"key"}
766
767 dsk = {t.key: t, t2.key: t2}
768 deps = DependenciesMapping(dsk)
769 del deps[t.key]
770 # The getitem is doing weird stuff and could mutate the task state
771 deps[t2.key]
772 assert t2.dependencies == {"key"}
773
774
775def test_fuse_tasks_key():

Callers

nothing calls this directly

Calls 3

TaskClass · 0.90
DependenciesMappingClass · 0.90
refMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…