@@ -277,17 +277,17 @@ def test_numpy_array_chunk_iterator(self):
277277
278278 def test_buffer_shape_option (self ):
279279 expected_buffer_shape = (1580 , 316 )
280- iterator_options = dict (buffer_shape = expected_buffer_shape )
280+ iterator_options = dict (buffer_shape = expected_buffer_shape , chunk_mb = 1.0 )
281281 self .check_first_data_chunk_call (
282282 expected_selection = tuple ([slice (0 , buffer_shape_axis ) for buffer_shape_axis in expected_buffer_shape ]),
283283 iterator_options = iterator_options ,
284284 )
285285 self .check_direct_hdf5_write (iterator_options = iterator_options )
286286
287287 def test_buffer_gb_option (self ):
288- # buffer is smaller than default chunk; should collapse to chunk shape
288+ # buffer is smaller than chunk; should collapse to chunk shape
289289 resulting_buffer_shape = (1580 , 316 )
290- iterator_options = dict (buffer_gb = 0.0005 )
290+ iterator_options = dict (buffer_gb = 0.0005 , chunk_mb = 1.0 )
291291 self .check_first_data_chunk_call (
292292 expected_selection = tuple (
293293 [
@@ -334,14 +334,14 @@ def test_chunk_mb_option_while_condition(self):
334334 """Test to evoke while condition of default shaping method."""
335335 expected_chunk_shape = (2 , 79 , 79 )
336336 special_array = np .random .randint (low = - (2 ** 15 ), high = 2 ** 15 - 1 , size = (2 , 2000 , 2000 ), dtype = "int16" )
337- iterator = self .TestNumpyArrayDataChunkIterator (array = special_array )
337+ iterator = self .TestNumpyArrayDataChunkIterator (array = special_array , chunk_mb = 1.0 )
338338 self .assertEqual (iterator .chunk_shape , expected_chunk_shape )
339339
340340 def test_chunk_mb_option_while_condition_unit_maxshape_axis (self ):
341341 """Test to evoke while condition of default shaping method."""
342342 expected_chunk_shape = (1 , 79 , 79 )
343343 special_array = np .random .randint (low = - (2 ** 15 ), high = 2 ** 15 - 1 , size = (1 , 2000 , 2000 ), dtype = "int16" )
344- iterator = self .TestNumpyArrayDataChunkIterator (array = special_array )
344+ iterator = self .TestNumpyArrayDataChunkIterator (array = special_array , chunk_mb = 1.0 )
345345 self .assertEqual (iterator .chunk_shape , expected_chunk_shape )
346346
347347 @unittest .skipIf (not TQDM_INSTALLED , "optional tqdm module is not installed" )
0 commit comments