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

Function test_zarr_pass_store

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

Source from the content-addressed store, hash-verified

5085
5086
5087def test_zarr_pass_store():
5088 zarr = pytest.importorskip("zarr")
5089
5090 with tmpdir() as d:
5091 if Version(zarr.__version__) < Version("3.0.0.a0"):
5092 store = zarr.storage.DirectoryStore(d)
5093 else:
5094 store = zarr.storage.LocalStore(d, read_only=False)
5095 a = da.zeros((3, 3), chunks=(1, 1))
5096 a.to_zarr(store)
5097 a2 = da.from_zarr(store)
5098 assert_eq(a, a2)
5099 assert a2.chunks == a.chunks
5100
5101
5102def test_zarr_group():

Callers

nothing calls this directly

Calls 4

tmpdirFunction · 0.90
assert_eqFunction · 0.90
to_zarrMethod · 0.80
zerosMethod · 0.45

Tested by

no test coverage detected