Skip to content

Commit c604075

Browse files
committed
use pytest.warns instead of pytest.raises
1 parent 7c644eb commit c604075

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/test_dtype/test_npy/test_bytes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_unstable_dtype_warning(
150150
Test that we get a warning when serializing a dtype without a zarr v3 spec to json
151151
when zarr_format is 3
152152
"""
153-
with pytest.raises(UnstableSpecificationWarning):
153+
with pytest.warns(UnstableSpecificationWarning):
154154
zdtype.to_json(zarr_format=3)
155155

156156

tests/test_dtype/test_npy/test_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_unstable_dtype_warning(zdtype: FixedLengthUTF32 | VariableLengthUTF8) -
131131
Test that we get a warning when serializing a dtype without a zarr v3 spec to json
132132
when zarr_format is 3
133133
"""
134-
with pytest.raises(UnstableSpecificationWarning):
134+
with pytest.warns(UnstableSpecificationWarning):
135135
zdtype.to_json(zarr_format=3)
136136

137137

0 commit comments

Comments
 (0)