Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pickling of stores #349

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading