MCPcopy
hub / github.com/dask/dask / test_store_deterministic_keys

Function test_store_deterministic_keys

dask/array/tests/test_array_core.py:2446–2455  ·  view source on GitHub ↗
(return_stored, delayed_target)

Source from the content-addressed store, hash-verified

2444@pytest.mark.parametrize("return_stored", [False, True])
2445@pytest.mark.parametrize("delayed_target", [False, True])
2446def test_store_deterministic_keys(return_stored, delayed_target):
2447 a = da.ones((10, 10), chunks=(2, 2))
2448 at = np.zeros(shape=(10, 10))
2449 if delayed_target:
2450 at = delayed(at)
2451 # Note: Disable the lock since every call to store would instantiate a new
2452 # SerializebleLock which would mess with the tokens
2453 st1 = a.store(at, return_stored=return_stored, compute=False, lock=False)
2454 st2 = a.store(at, return_stored=return_stored, compute=False, lock=False)
2455 assert set(st1.dask.keys()) == set(st2.dask.keys())
2456
2457
2458def test_to_hdf5():

Callers

nothing calls this directly

Calls 6

delayedFunction · 0.90
setClass · 0.85
storeMethod · 0.80
onesMethod · 0.45
zerosMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…