Skip to content

Commit 7893348

Browse files
authored
add a new pattern to the non-existent store patterns (pydata#10700)
* ignore the new pattern * construct the pattern dynamically
1 parent 46ae1d4 commit 7893348

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

xarray/tests/test_backends.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,10 +2653,13 @@ def test_read_non_consolidated_warning(self) -> None:
26532653
assert_identical(ds, expected)
26542654

26552655
def test_non_existent_store(self) -> None:
2656-
with pytest.raises(
2657-
FileNotFoundError,
2658-
match="(No such file or directory|Unable to find group|No group found in store|does not exist)",
2659-
):
2656+
patterns = [
2657+
"No such file or directory",
2658+
"Unable to find group",
2659+
"No group found in store",
2660+
"does not exist",
2661+
]
2662+
with pytest.raises(FileNotFoundError, match=f"({'|'.join(patterns)})"):
26602663
xr.open_zarr(f"{uuid.uuid4()}")
26612664

26622665
@pytest.mark.skipif(has_zarr_v3, reason="chunk_store not implemented in zarr v3")

0 commit comments

Comments
 (0)