Skip to content

Commit ac1c82d

Browse files
committed
Fixup tests
1 parent 8665f29 commit ac1c82d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/test_metadata/test_v3.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
parse_fill_value,
2121
parse_zarr_format,
2222
)
23-
from zarr.errors import MetadataValidationError
23+
from zarr.errors import MetadataValidationError, NodeTypeValidationError
2424

2525
if TYPE_CHECKING:
2626
from collections.abc import Sequence
@@ -62,7 +62,8 @@
6262
@pytest.mark.parametrize("data", [None, 1, 2, 4, 5, "3"])
6363
def test_parse_zarr_format_invalid(data: Any) -> None:
6464
with pytest.raises(
65-
ValueError, match=f"Invalid value for 'zarr_format'. Expected '3'. Got '{data}'."
65+
MetadataValidationError,
66+
match=f"Invalid value for 'zarr_format'. Expected '3'. Got '{data}'.",
6667
):
6768
parse_zarr_format(data)
6869

@@ -88,7 +89,8 @@ def test_parse_node_type_invalid(node_type: Any) -> None:
8889
@pytest.mark.parametrize("data", [None, "group"])
8990
def test_parse_node_type_array_invalid(data: Any) -> None:
9091
with pytest.raises(
91-
ValueError, match=f"Invalid value for 'node_type'. Expected 'array'. Got '{data}'."
92+
NodeTypeValidationError,
93+
match=f"Invalid value for 'node_type'. Expected 'array'. Got '{data}'.",
9294
):
9395
parse_node_type_array(data)
9496

0 commit comments

Comments
 (0)