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

Function test_getcycle

dask/tests/test_core.py:280–306  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

278
279
280def test_getcycle():
281 dsk = {
282 0: [7, 13, 7, 9, 13, 3, 9, 18, 18, 17],
283 1: [14, 14, 12, 1, 9, 16, 4, 5, 9, 8],
284 2: [3, 1, 7, 7, 2, 0, 0, 6, 3, 2],
285 3: [4, 8, 3, 14, 15, 19, 14, 1, 9, 1],
286 4: [9, 13, 19, 4, 16, 8, 11, 1, 16, 1],
287 5: [9, 8, 12, 13, 10, 13, 19, 3, 18, 18],
288 6: [10, 2, 13, 16, 3, 12, 7, 16, 5, 17],
289 7: [16, 8, 6, 4, 4, 10, 3, 1, 13, 10],
290 8: [11, 4, 12, 10, 14, 6, 18, 15, 16, 12],
291 9: [17, 18, 5, 16, 19, 16, 3, 6, 16, 18],
292 }
293 assert len(getcycle(dsk, list(dsk))) <= 3 # 7->6->7
294 dsk = {
295 0: [1, 27, 6, 25, 30, 16, 1, 1, 35, 17],
296 1: [35, 22, 21, 31, 2, 28, 36, 0, 29, 29],
297 2: [14, 27, 10, 1, 38, 18, 28, 28, 6, 0],
298 3: [0, 37, 7, 16, 38, 28, 34, 13, 30, 10],
299 4: [22, 22, 27, 13, 29, 36, 22, 9, 39, 19],
300 5: [38, 7, 18, 17, 33, 5, 29, 11, 23, 30],
301 6: [3, 30, 28, 38, 4, 13, 14, 27, 29, 38],
302 7: [22, 27, 12, 2, 22, 16, 34, 15, 18, 16],
303 8: [36, 21, 24, 22, 28, 38, 21, 2, 4, 24],
304 9: [38, 32, 38, 7, 31, 34, 39, 20, 30, 18],
305 }
306 assert len(getcycle(dsk, list(dsk))) <= 4 # 0->1->2->0

Callers

nothing calls this directly

Calls 1

getcycleFunction · 0.90

Tested by

no test coverage detected