Skip to content

Commit a728ef0

Browse files
committed
fix the mocker json test
1 parent ca5022e commit a728ef0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_reductionist_json.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, f, v):
2020
self.dtype = np.dtype(ds.dtype)
2121
self.array = pyfive.indexing.ZarrArrayStub(ds.shape, ds.chunks or ds.shape)
2222
self.missing = get_missing_attributes(ds)
23-
ds = ds._dataobjects
23+
ds = ds.id
2424
self.ds = ds
2525
def __getitem__(self, args):
2626
if self.ds.filter_pipeline is None:
@@ -30,12 +30,13 @@ def __getitem__(self, args):
3030
if self.ds.chunks is not None:
3131
self.ds._get_chunk_addresses()
3232

33-
indexer = pyfive.OrthogonalIndexer(args, self.array)
33+
indexer = pyfive.indexing.OrthogonalIndexer(args, self.array)
3434
for chunk_coords, chunk_selection, out_selection in indexer:
35-
offset, size, filter_mask = self.ds.get_chunk_details(chunk_coords)
35+
storeinfo = self.ds.get_chunk_info_from_chunk_coord(chunk_coords)
36+
offset, size = storeinfo.byte_offset, storeinfo.size
3637
jd = reductionist.build_request_data('a','b','c',
3738
offset, size, compressor, filters, self.missing, self.dtype,
38-
self.array._chunks,self.ds.order,chunk_selection)
39+
self.array._chunks,self.ds._order,chunk_selection)
3940
js = json.dumps(jd)
4041
return None
4142

0 commit comments

Comments
 (0)