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

Function test_finalize_name

dask/tests/test_delayed.py:731–745  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

729
730
731def test_finalize_name():
732 pytest.importorskip("numpy")
733 da = pytest.importorskip("dask.array")
734
735 x = da.ones(10, chunks=5)
736 v = delayed([x])
737 assert set(x.dask).issubset(v.dask)
738
739 def key(s):
740 if isinstance(s, tuple):
741 s = s[0]
742 # Ignore _ in 'ones_like'
743 return s.split("-")[0].replace("_", "")
744
745 assert all(key(k).isalpha() for k in v.dask)
746
747
748def test_keys_from_array():

Callers

nothing calls this directly

Calls 5

delayedFunction · 0.90
setClass · 0.85
allFunction · 0.85
keyFunction · 0.70
onesMethod · 0.45

Tested by

no test coverage detected