(self)
| 2903 | pass |
| 2904 | |
| 2905 | def test_shard_encoding(self) -> None: |
| 2906 | # These datasets have no dask chunks. All chunking/sharding specified in |
| 2907 | # encoding |
| 2908 | if has_zarr_v3 and zarr.config.config["default_zarr_format"] == 3: |
| 2909 | data = create_test_data() |
| 2910 | chunks = (1, 1) |
| 2911 | shards = (5, 5) |
| 2912 | data["var2"].encoding.update({"chunks": chunks}) |
| 2913 | data["var2"].encoding.update({"shards": shards}) |
| 2914 | with self.roundtrip(data) as actual: |
| 2915 | assert shards == actual["var2"].encoding["shards"] |
| 2916 | |
| 2917 | # expect an error with shards not divisible by chunks |
| 2918 | data["var2"].encoding.update({"chunks": (2, 2)}) |
| 2919 | with pytest.raises(ValueError): |
| 2920 | with self.roundtrip(data) as actual: |
| 2921 | pass |
| 2922 | |
| 2923 | @requires_dask |
| 2924 | def test_shard_encoding_with_dask(self) -> None: |
nothing calls this directly
no test coverage detected