Skip to content

Commit 272d05a

Browse files
committed
Add test for #2490
1 parent c070940 commit 272d05a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_api.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,6 +1086,13 @@ async def test_open_falls_back_to_open_group_async() -> None:
10861086
assert group.attrs == {"key": "value"}
10871087

10881088

1089+
def test_open_mode_write_creates_group(tmp_path: pathlib.Path) -> None:
1090+
# https://github.com/zarr-developers/zarr-python/issues/2490
1091+
zarr_dir = tmp_path / "test.zarr"
1092+
group = zarr.open(zarr_dir, mode="w")
1093+
assert isinstance(group, Group)
1094+
1095+
10891096
async def test_metadata_validation_error() -> None:
10901097
with pytest.raises(
10911098
MetadataValidationError,

0 commit comments

Comments
 (0)