Skip to content

Commit 81d7eec

Browse files
andrewfulton9joshmoore
authored andcommitted
defines blocksize for array, updates hexdigest values (#867)
1 parent a765bad commit 81d7eec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

zarr/tests/test_core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2602,7 +2602,7 @@ def create_array(read_only=False, **kwargs):
26022602
store = FSStore(path)
26032603
cache_metadata = kwargs.pop("cache_metadata", True)
26042604
cache_attrs = kwargs.pop("cache_attrs", True)
2605-
kwargs.setdefault("compressor", Blosc())
2605+
kwargs.setdefault("compressor", Blosc(blocksize=256))
26062606
init_array(store, **kwargs)
26072607
return Array(
26082608
store,
@@ -2615,11 +2615,11 @@ def create_array(read_only=False, **kwargs):
26152615
def test_hexdigest(self):
26162616
# Check basic 1-D array
26172617
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
2618-
assert "f710da18d45d38d4aaf2afd7fb822fdd73d02957" == z.hexdigest()
2618+
assert "dd7577d645c38767cf6f6d1ef8fd64002883a014" == z.hexdigest()
26192619

26202620
# Check basic 1-D array with different type
26212621
z = self.create_array(shape=(1050,), chunks=100, dtype="<f4")
2622-
assert "1437428e69754b1e1a38bd7fc9e43669577620db" == z.hexdigest()
2622+
assert "aa0de9892cf1ed3cda529efbf3233720b84489b7" == z.hexdigest()
26232623

26242624
# Check basic 2-D array
26252625
z = self.create_array(
@@ -2630,17 +2630,17 @@ def test_hexdigest(self):
26302630
chunks=10,
26312631
dtype="<i4",
26322632
)
2633-
assert "6c530b6b9d73e108cc5ee7b6be3d552cc994bdbe" == z.hexdigest()
2633+
assert "e6191c44cf958576c29c41cef0f55b028a4dbdff" == z.hexdigest()
26342634

26352635
# Check basic 1-D array with some data
26362636
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
26372637
z[200:400] = np.arange(200, 400, dtype="i4")
2638-
assert "4c0a76fb1222498e09dcd92f7f9221d6cea8b40e" == z.hexdigest()
2638+
assert "88adeeabb819feecccadf50152293dbb42f9107e" == z.hexdigest()
26392639

26402640
# Check basic 1-D array with attributes
26412641
z = self.create_array(shape=(1050,), chunks=100, dtype="<i4")
26422642
z.attrs["foo"] = "bar"
2643-
assert "05b0663ffe1785f38d3a459dec17e57a18f254af" == z.hexdigest()
2643+
assert "1426e084427f9920e29c9ec81b663d1005849455" == z.hexdigest()
26442644

26452645
def test_non_cont(self):
26462646
z = self.create_array(shape=(500, 500, 500), chunks=(50, 50, 50), dtype="<i4")

0 commit comments

Comments
 (0)