Skip to content

Commit 9003e4e

Browse files
committed
dont need to explicitly close arrays anymore
1 parent 1fea852 commit 9003e4e

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

zarr/tests/test_core.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2389,31 +2389,22 @@ def test_hexdigest(self):
23892389
# Check basic 1-D array
23902390
z = self.create_array(shape=(1050,), chunks=100, dtype='<i4')
23912391
assert 'f710da18d45d38d4aaf2afd7fb822fdd73d02957' == z.hexdigest()
2392-
if hasattr(z.store, 'close'):
2393-
z.store.close()
23942392

23952393
# Check basic 1-D array with different type
23962394
z = self.create_array(shape=(1050,), chunks=100, dtype='<f4')
23972395
assert '1437428e69754b1e1a38bd7fc9e43669577620db' == z.hexdigest()
2398-
if hasattr(z.store, 'close'):
2399-
z.store.close()
24002396

24012397
# Check basic 2-D array
24022398
z = self.create_array(shape=(20, 35,), chunks=10, dtype='<i4')
24032399
assert '6c530b6b9d73e108cc5ee7b6be3d552cc994bdbe' == z.hexdigest()
2404-
if hasattr(z.store, 'close'):
2405-
z.store.close()
24062400

24072401
# Check basic 1-D array with some data
24082402
z = self.create_array(shape=(1050,), chunks=100, dtype='<i4')
24092403
z[200:400] = np.arange(200, 400, dtype='i4')
24102404
assert '4c0a76fb1222498e09dcd92f7f9221d6cea8b40e' == z.hexdigest()
2411-
if hasattr(z.store, 'close'):
2412-
z.store.close()
24132405

24142406
# Check basic 1-D array with attributes
24152407
z = self.create_array(shape=(1050,), chunks=100, dtype='<i4')
24162408
z.attrs['foo'] = 'bar'
24172409
assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z.hexdigest()
2418-
if hasattr(z.store, 'close'):
2419-
z.store.close()
2410+

0 commit comments

Comments
 (0)