We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 31dd8a9 commit ee21ccfCopy full SHA for ee21ccf
tests/test_api.py
@@ -285,8 +285,12 @@ def test_open_with_mode_r(tmp_path: Path) -> None:
285
286
def test_open_with_mode_r_plus(tmp_path: Path) -> None:
287
# 'r+' means read/write (must exist)
288
+ new_store_path = tmp_path / "new_store.zarr"
289
+ assert not new_store_path.exists(), "Test should operate on non-existent directory"
290
with pytest.raises(FileNotFoundError):
- zarr.open(store=tmp_path, mode="r+")
291
+ zarr.open(store=new_store_path, mode="r+")
292
+ assert not new_store_path.exists(), "mode='r+' should not create directory"
293
+
294
zarr.ones(store=tmp_path, shape=(3, 3))
295
z2 = zarr.open(store=tmp_path, mode="r+")
296
assert isinstance(z2, Array)
0 commit comments