Skip to content

Commit

Permalink
Fix pickling of stores (#349)
Browse files Browse the repository at this point in the history
* Unxfail tests

xref #348

* Switch the store test to use local filesystem

---------

Co-authored-by: Matthew Iannucci <matthew@earthmover.io>
  • Loading branch information
dcherian and mpiannucci authored Oct 30, 2024
1 parent 56f2836 commit 5aa9abe
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions icechunk-python/tests/test_zarr/test_store/test_icechunk_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ class TestIcechunkStore(StoreTests[IcechunkStore, cpu.Buffer]):
def test_store_eq(self, store: IcechunkStore, store_kwargs: dict[str, Any]) -> None:
pass

@pytest.mark.xfail(reason="not implemented", strict=False)
async def test_serizalizable_store(self, store) -> None:
pass

async def set(self, store: IcechunkStore, key: str, value: Buffer) -> None:
await store._store.set(key, value.to_bytes())

Expand All @@ -46,10 +42,10 @@ async def get(self, store: IcechunkStore, key: str) -> Buffer:

return self.buffer_cls.from_bytes(result)

@pytest.fixture(scope="function", params=[None, True])
def store_kwargs(self) -> dict[str, Any]:
@pytest.fixture
def store_kwargs(self, tmpdir) -> dict[str, Any]:
kwargs = {
"storage": StorageConfig.memory("store_test"),
"storage": StorageConfig.filesystem(f"{tmpdir}/store_test"),
"mode": "w",
}
return kwargs
Expand All @@ -62,10 +58,6 @@ async def store(self, store_kwargs: dict[str, Any]) -> IcechunkStore:
def test_store_repr(self, store: IcechunkStore) -> None:
super().test_store_repr(store)

@pytest.mark.xfail(reason="Not implemented")
def test_serializable_store(self, store: IcechunkStore) -> None:
super().test_serializable_store(store)

def test_store_mode(self, store, store_kwargs: dict[str, Any]) -> None:
assert store.mode == AccessMode.from_literal("w")
assert not store.mode.readonly
Expand Down

0 comments on commit 5aa9abe

Please sign in to comment.