MCPcopy
hub / github.com/dask/dask / test_substitute

Function test_substitute

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

Source from the content-addressed store, hash-verified

1087
1088
1089def test_substitute():
1090 t1 = Task("key-1", func, TaskRef("a"), "b")
1091 assert t1.substitute({"a": "a"}) is t1
1092 assert t1.substitute({"a": "a"}, key="foo") is not t1
1093 t2 = t1.substitute({"a": "c"})
1094 assert t2 is not t1
1095 assert t2.dependencies == {"c"}
1096
1097 assert t1({"a": "a"}) == t2({"c": "a"})
1098
1099
1100def test_alias_task_ref_key():

Callers

nothing calls this directly

Calls 3

substituteMethod · 0.95
TaskClass · 0.90
TaskRefClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…