Skip to content

Commit

Permalink
fix bad test
Browse files Browse the repository at this point in the history
  • Loading branch information
martindurant committed Aug 25, 2023
1 parent 2950deb commit 5fc5470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kerchunk/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_subchunk_exact(m, chunks):

out = kerchunk.utils.subchunk(ref, "data", 5)
nchunk = 10 // chunks[0] * 5
assert list(ref) == [".zgroup", "data/.zarray"] + [
assert list(out) == [".zgroup", "data/.zarray"] + [
f"data/{_}.0" for _ in range(nchunk)
]

Expand Down
1 change: 1 addition & 0 deletions kerchunk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ def subchunk(store, variable, factor):
modified store
"""
fs = fsspec.filesystem("reference", fo=store)
store = copy.deepcopy(store)
meta_file = f"{variable}/.zarray"
meta = ujson.loads(fs.cat(meta_file))
if meta["compressor"] is not None:
Expand Down

0 comments on commit 5fc5470

Please sign in to comment.