Skip to content

Commit 7a71174

Browse files
committed
Add fixtures for object store tests
1 parent 4418426 commit 7a71174

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/test_store/test_object.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ruff: noqa: E402
22
import pytest
33

4-
pytest.importorskip("obstore")
4+
obstore = pytest.importorskip("obstore")
55

66
from zarr.core.buffer import cpu
77
from zarr.storage.object_store import ObjectStore
@@ -10,3 +10,13 @@
1010

1111
class TestObjectStore(StoreTests[ObjectStore, cpu.Buffer]):
1212
store_cls = ObjectStore
13+
buffer_cls = cpu.Buffer
14+
15+
@pytest.fixture
16+
def store_kwargs(self, tmpdir) -> dict[str, str | bool]:
17+
store = obstore.store.LocalStore(prefix=tmpdir)
18+
return {"store": store, "read_only": False}
19+
20+
@pytest.fixture
21+
def store(self, store_kwargs: dict[str, str | bool]) -> ObjectStore:
22+
return self.store_cls(**store_kwargs)

0 commit comments

Comments
 (0)