Skip to content

Commit

Permalink
Fix icechunk tests to opt-in to pickling and unpickling of Session an…
Browse files Browse the repository at this point in the history
…d IcechunkStore following earth-mover/icechunk#652
  • Loading branch information
tomwhite committed Feb 4, 2025
1 parent 3e5d6e2 commit ab62bab
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cubed/tests/test_icechunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,13 @@ def test_store_icechunk(icechunk_storage, executor):

repo = Repository.create(storage=icechunk_storage)
session = repo.writable_session("main")
store = session.store

group = zarr.group(store=store, overwrite=True)
target = group.create_array("a", shape=a.shape, dtype=a.dtype, chunks=a.chunksize)
store_icechunk(session, sources=a, targets=target, executor=executor)
with session.allow_pickling():
store = session.store
group = zarr.group(store=store, overwrite=True)
target = group.create_array(
"a", shape=a.shape, dtype=a.dtype, chunks=a.chunksize
)
store_icechunk(session, sources=a, targets=target, executor=executor)
session.commit("commit 1")

# reopen store and check contents of array
Expand Down

0 comments on commit ab62bab

Please sign in to comment.