Skip to content

Commit

Permalink
Try to add a test that exercise partial decompress of non-contiguous.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Dec 11, 2020
1 parent f4d3039 commit 3ae237f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zarr/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2443,3 +2443,9 @@ def test_hexdigest(self):
z = self.create_array(shape=(1050,), chunks=100, dtype='<i4')
z.attrs['foo'] = 'bar'
assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z.hexdigest()

def test_non_cont(self):
z = self.create_array(shape=(500,500, 500), chunks=(50, 50, 50), dtype='<i4')
z[:,:,:] = 0
# actually go through the partial read by accessing a single item
assert z[0,:,0].any()

0 comments on commit 3ae237f

Please sign in to comment.