MCPcopy
hub / github.com/dask/dask / test_task_eq

Function test_task_eq

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

Source from the content-addressed store, hash-verified

87
88
89def test_task_eq():
90 assert Alias(("x", 0, 0)) == Alias(("x", 0, 0))
91 assert Alias(("x", 0, 0)) != Alias(("x", 0, 1))
92
93 assert List(Alias(("x", 0, 0))) == List(Alias(("x", 0, 0)))
94 assert List(Alias(("x", 0, 0))) == List(Alias("a", "a")).substitute(
95 {"a": ("x", 0, 0)}
96 )
97 assert List(Alias(("x", 0, 0)), Alias(("x", 0, 1))) != List(
98 Alias(("x", 0, 0)), Alias(("x", 0, 2))
99 )
100
101 obj = Task(
102 ("z", 0, 0),
103 func,
104 List(TaskRef(("x", 0, 0)), TaskRef(("x", 0, 1))),
105 List(TaskRef(("y", 0, 0)), TaskRef(("y", 1, 0))),
106 )
107 assert obj == obj
108 assert obj == Task(
109 ("z", 0, 0),
110 func,
111 List(TaskRef(("x", 0, 0)), TaskRef(("x", 0, 1))),
112 List(TaskRef(("y", 0, 0)), TaskRef(("y", 1, 0))),
113 )
114
115
116def long_function_name_longer_even_longer(a, b):

Callers

nothing calls this directly

Calls 5

AliasClass · 0.90
ListClass · 0.90
TaskClass · 0.90
TaskRefClass · 0.90
substituteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…