MCPcopy
hub / github.com/dask/dask / test_tokenize

Function test_tokenize

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

Source from the content-addressed store, hash-verified

331
332
333def test_tokenize():
334 t = Task("key-1", func, "a", "b")
335 assert tokenize(t) == tokenize(t)
336
337 t2 = Task("key-1", func, "a", "b")
338 assert tokenize(t) == tokenize(t2)
339
340 tokenize(t)
341
342 # Literals are often generated with random/anom names but that should not
343 # impact hashing. Otherwise identical submits would end up with different
344 # tokens
345 l = DataNode("key-1", "a")
346 l2 = DataNode("key-2", "a")
347 assert tokenize(l) == tokenize(l2)
348
349
350async def afunc(a, b):

Callers

nothing calls this directly

Calls 3

TaskClass · 0.90
tokenizeFunction · 0.90
DataNodeClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…