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

Function test_store

dask/array/tests/test_array_core.py:2142–2156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2140
2141
2142def test_store():
2143 d = da.ones((4, 4), chunks=(2, 2))
2144 a, b = d + 1, d + 2
2145
2146 at = np.empty(shape=(4, 4))
2147 bt = np.empty(shape=(4, 4))
2148
2149 st = store([a, b], [at, bt])
2150 assert st is None
2151 assert (at == 2).all()
2152 assert (bt == 3).all()
2153
2154 pytest.raises(ValueError, lambda: store([a], [at, bt]))
2155 pytest.raises(ValueError, lambda: store(at, at))
2156 pytest.raises(ValueError, lambda: store([at, bt], [at, bt]))
2157
2158
2159def test_store_regions():

Callers

nothing calls this directly

Calls 4

storeFunction · 0.90
onesMethod · 0.45
emptyMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected