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

Function test_zarr_irregular_chunks

dask/array/tests/test_array_core.py:5073–5082  ·  view source on GitHub ↗
(shape, chunks, expect_rechunk)

Source from the content-addressed store, hash-verified

5071 ],
5072)
5073def test_zarr_irregular_chunks(shape, chunks, expect_rechunk):
5074 pytest.importorskip("zarr")
5075 with tmpdir() as d:
5076 a = da.zeros(shape, chunks=chunks) # ((2, 1, 1, 2), 1))
5077 store_delayed = a.to_zarr(d, component="test", compute=False)
5078 assert (
5079 any("rechunk" in key_split(k) for k in dict(store_delayed.dask))
5080 is expect_rechunk
5081 )
5082 store_delayed.compute()
5083
5084
5085@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 6

tmpdirFunction · 0.90
key_splitFunction · 0.90
anyFunction · 0.85
to_zarrMethod · 0.80
zerosMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected