(shape, chunks, expect_rechunk)
| 5071 | ], |
| 5072 | ) |
| 5073 | def 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( |