|
42 | 42 | save_group, |
43 | 43 | ) |
44 | 44 | from zarr.core.buffer import NDArrayLike |
45 | | -from zarr.errors import MetadataValidationError, ZarrDeprecationWarning, ZarrUserWarning |
| 45 | +from zarr.errors import ArrayNotFoundError, MetadataValidationError, ZarrDeprecationWarning, ZarrUserWarning |
46 | 46 | from zarr.storage import MemoryStore |
47 | 47 | from zarr.storage._utils import normalize_path |
48 | 48 | from zarr.testing.utils import gpu_test |
@@ -161,7 +161,7 @@ async def test_open_array(memory_store: MemoryStore, zarr_format: ZarrFormat) -> |
161 | 161 | assert z.read_only |
162 | 162 |
|
163 | 163 | # path not found |
164 | | - with pytest.raises(FileNotFoundError): |
| 164 | + with pytest.raises(ArrayNotFoundError): |
165 | 165 | zarr.api.synchronous.open(store="doesnotexist", mode="r", zarr_format=zarr_format) |
166 | 166 |
|
167 | 167 |
|
@@ -1200,7 +1200,7 @@ async def test_metadata_validation_error() -> None: |
1200 | 1200 | ) |
1201 | 1201 | def test_open_array_with_mode_r_plus(store: Store, zarr_format: ZarrFormat) -> None: |
1202 | 1202 | # 'r+' means read/write (must exist) |
1203 | | - with pytest.raises(FileNotFoundError): |
| 1203 | + with pytest.raises(ArrayNotFoundError): |
1204 | 1204 | zarr.open_array(store=store, mode="r+", zarr_format=zarr_format) |
1205 | 1205 | zarr.ones(store=store, shape=(3, 3), zarr_format=zarr_format) |
1206 | 1206 | z2 = zarr.open_array(store=store, mode="r+") |
|
0 commit comments