Skip to content

Commit 4b7a79f

Browse files
committed
Add ArrayNotFoundError to test_api.py
1 parent 1b70b66 commit 4b7a79f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
save_group,
4343
)
4444
from zarr.core.buffer import NDArrayLike
45-
from zarr.errors import MetadataValidationError, ZarrDeprecationWarning, ZarrUserWarning
45+
from zarr.errors import ArrayNotFoundError, MetadataValidationError, ZarrDeprecationWarning, ZarrUserWarning
4646
from zarr.storage import MemoryStore
4747
from zarr.storage._utils import normalize_path
4848
from zarr.testing.utils import gpu_test
@@ -161,7 +161,7 @@ async def test_open_array(memory_store: MemoryStore, zarr_format: ZarrFormat) ->
161161
assert z.read_only
162162

163163
# path not found
164-
with pytest.raises(FileNotFoundError):
164+
with pytest.raises(ArrayNotFoundError):
165165
zarr.api.synchronous.open(store="doesnotexist", mode="r", zarr_format=zarr_format)
166166

167167

@@ -1200,7 +1200,7 @@ async def test_metadata_validation_error() -> None:
12001200
)
12011201
def test_open_array_with_mode_r_plus(store: Store, zarr_format: ZarrFormat) -> None:
12021202
# 'r+' means read/write (must exist)
1203-
with pytest.raises(FileNotFoundError):
1203+
with pytest.raises(ArrayNotFoundError):
12041204
zarr.open_array(store=store, mode="r+", zarr_format=zarr_format)
12051205
zarr.ones(store=store, shape=(3, 3), zarr_format=zarr_format)
12061206
z2 = zarr.open_array(store=store, mode="r+")

0 commit comments

Comments
 (0)