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 0286bd6 commit 01cf884Copy full SHA for 01cf884
tests/test_api.py
@@ -333,8 +333,12 @@ def test_open_with_mode_r(tmp_path: Path) -> None:
333
334
def test_open_with_mode_r_plus(tmp_path: Path) -> None:
335
# 'r+' means read/write (must exist)
336
+ new_store_path = tmp_path / "new_store.zarr"
337
+ assert not new_store_path.exists(), "Test should operate on non-existent directory"
338
with pytest.raises(FileNotFoundError):
- zarr.open(store=tmp_path, mode="r+")
339
+ zarr.open(store=new_store_path, mode="r+")
340
+ assert not new_store_path.exists(), "mode='r+' should not create directory"
341
+
342
zarr.ones(store=tmp_path, shape=(3, 3))
343
z2 = zarr.open(store=tmp_path, mode="r+")
344
assert isinstance(z2, Array)
0 commit comments