@@ -2479,28 +2479,41 @@ def create_array(read_only=False, **kwargs):
2479
2479
return Array (store , read_only = read_only , cache_metadata = cache_metadata ,
2480
2480
cache_attrs = cache_attrs )
2481
2481
2482
+ def expected (self ):
2483
+ return [
2484
+ "ab753fc81df0878589535ca9bad2816ba88d91bc" ,
2485
+ "c16261446f9436b1e9f962e57ce3e8f6074abe8a" ,
2486
+ "c2ef3b2fb2bc9dcace99cd6dad1a7b66cc1ea058" ,
2487
+ "6e52f95ac15b164a8e96843a230fcee0e610729b" ,
2488
+ "091fa99bc60706095c9ce30b56ce2503e0223f56" ,
2489
+ ]
2490
+
2482
2491
def test_hexdigest (self ):
2492
+ found = []
2493
+
2483
2494
# Check basic 1-D array
2484
2495
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2485
- assert 'f710da18d45d38d4aaf2afd7fb822fdd73d02957' == z .hexdigest ()
2496
+ found . append ( z .hexdigest () )
2486
2497
2487
2498
# Check basic 1-D array with different type
2488
2499
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<f4' )
2489
- assert '1437428e69754b1e1a38bd7fc9e43669577620db' == z .hexdigest ()
2500
+ found . append ( z .hexdigest () )
2490
2501
2491
2502
# Check basic 2-D array
2492
2503
z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '<i4' )
2493
- assert '6c530b6b9d73e108cc5ee7b6be3d552cc994bdbe' == z .hexdigest ()
2504
+ found . append ( z .hexdigest () )
2494
2505
2495
2506
# Check basic 1-D array with some data
2496
2507
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2497
2508
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
2498
- assert '4c0a76fb1222498e09dcd92f7f9221d6cea8b40e' == z .hexdigest ()
2509
+ found . append ( z .hexdigest () )
2499
2510
2500
2511
# Check basic 1-D array with attributes
2501
2512
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2502
2513
z .attrs ['foo' ] = 'bar'
2503
- assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z .hexdigest ()
2514
+ found .append (z .hexdigest ())
2515
+
2516
+ assert self .expected () == found
2504
2517
2505
2518
2506
2519
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
@@ -2579,6 +2592,7 @@ def test_read_from_all_blocks(self):
2579
2592
2580
2593
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
2581
2594
class TestArrayWithFSStoreNested (TestArray ):
2595
+
2582
2596
@staticmethod
2583
2597
def create_array (read_only = False , ** kwargs ):
2584
2598
path = mkdtemp ()
@@ -2592,29 +2606,41 @@ def create_array(read_only=False, **kwargs):
2592
2606
return Array (store , read_only = read_only , cache_metadata = cache_metadata ,
2593
2607
cache_attrs = cache_attrs )
2594
2608
2609
+ def expected (self ):
2610
+ return [
2611
+ "94884f29b41b9beb8fc99ad7bf9c0cbf0f2ab3c9" ,
2612
+ "077aa3bd77b8d354f8f6c15dce5ae4f545788a72" ,
2613
+ "22be95d83c097460adb339d80b2d7fe19c513c16" ,
2614
+ "85131cec526fa46938fd2c4a6083a58ee11037ea" ,
2615
+ "c3167010c162c6198cb2bf3c1da2c46b047c69a1" ,
2616
+ ]
2617
+
2595
2618
def test_hexdigest (self ):
2619
+ found = []
2620
+
2596
2621
# Check basic 1-D array
2597
2622
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2598
- assert 'f710da18d45d38d4aaf2afd7fb822fdd73d02957' == z .hexdigest ()
2623
+ found . append ( z .hexdigest () )
2599
2624
2600
2625
# Check basic 1-D array with different type
2601
2626
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<f4' )
2602
- assert '1437428e69754b1e1a38bd7fc9e43669577620db' == z .hexdigest ()
2627
+ found . append ( z .hexdigest () )
2603
2628
2604
2629
# Check basic 2-D array
2605
2630
z = self .create_array (shape = (20 , 35 ,), chunks = 10 , dtype = '<i4' )
2606
- assert '6c530b6b9d73e108cc5ee7b6be3d552cc994bdbe' == z .hexdigest ()
2631
+ found . append ( z .hexdigest () )
2607
2632
2608
2633
# Check basic 1-D array with some data
2609
2634
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2610
2635
z [200 :400 ] = np .arange (200 , 400 , dtype = 'i4' )
2611
- assert '4c0a76fb1222498e09dcd92f7f9221d6cea8b40e' == z .hexdigest ()
2636
+ found . append ( z .hexdigest () )
2612
2637
2613
2638
# Check basic 1-D array with attributes
2614
2639
z = self .create_array (shape = (1050 ,), chunks = 100 , dtype = '<i4' )
2615
2640
z .attrs ['foo' ] = 'bar'
2616
- assert '05b0663ffe1785f38d3a459dec17e57a18f254af' == z .hexdigest ()
2641
+ found . append ( z .hexdigest () )
2617
2642
2643
+ assert self .expected () == found
2618
2644
2619
2645
@pytest .mark .skipif (have_fsspec is False , reason = "needs fsspec" )
2620
2646
class TestArrayWithFSStoreNestedPartialRead (TestArray ):
0 commit comments