Skip to content

Commit 26a0374

Browse files
committed
fix pcodec test
1 parent 6a795b6 commit 26a0374

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

numcodecs/tests/test_zarr3.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,12 @@ def test_generic_bytes_codec(store: Store, codec_id: str):
181181
try:
182182
get_codec({"id": codec_id})
183183
except ValueError as e:
184-
if "codec not available" in str(e) or "codec must be installed" in str(e):
185-
pytest.xfail(f"{codec_id} is not available")
184+
if "codec not available" in str(e):
185+
pytest.xfail(f"{codec_id} is not available: {e}")
186186
else:
187187
raise
188+
except ImportError as e:
189+
pytest.xfail(f"{codec_id} is not available: {e}")
188190

189191
data = np.arange(0, 256, dtype="float32").reshape((16, 16))
190192

0 commit comments

Comments
 (0)