Skip to content

Commit 9aeee54

Browse files
committed
test: add test for the memory scheme : memoryfilesystem mapping
1 parent 6661f22 commit 9aeee54

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/test_store/test_fsspec.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from zarr.core.sync import _collect_aiterator, sync
1717
from zarr.errors import ZarrUserWarning
1818
from zarr.storage import FsspecStore
19+
from zarr.storage._common import make_store
1920
from zarr.storage._fsspec import _make_async
2021
from zarr.testing.store import StoreTests
2122

@@ -544,3 +545,10 @@ async def test_with_read_only_auto_mkdir(tmp_path: Path) -> None:
544545

545546
store_w = FsspecStore.from_url(f"file://{tmp_path}", storage_options={"auto_mkdir": False})
546547
_ = store_w.with_read_only()
548+
549+
550+
async def test_memory_scheme() -> None:
551+
"""Test that the "memory" scheme creates a `MemoryFileSystem`-backed store"""
552+
store = await make_store("memory://test")
553+
assert isinstance(store, FsspecStore)
554+
assert store.fs.protocol == "memory"

0 commit comments

Comments
 (0)