@@ -92,7 +92,7 @@ def create_h5_input_data(self, shape=3*(64,)):
9292 data = np .random .rand (* shape )
9393 test_path = os .path .join (self .test_folder , "data-h5.h5" )
9494 key = "data"
95- with open_file (test_path ) as f :
95+ with open_file (test_path , mode = "a" ) as f :
9696 f .create_dataset (key , data = data )
9797 return test_path , key , data
9898
@@ -108,11 +108,11 @@ def test_import_tif(self):
108108 im_folder = os .path .join (self .test_folder , "im-stack" )
109109 os .makedirs (im_folder , exist_ok = True )
110110
111- resolution = (0.25 , 1 , 1 )
111+ resolution = (0.25 , 1 , 1 )
112112
113113 for z in range (shape [0 ]):
114114 path = os .path .join (im_folder , "z_%03i.tif" % z )
115- imageio .imsave (path , data [z ])
115+ imageio .imwrite (path , data [z ])
116116
117117 scales = [[1 , 2 , 2 ], [1 , 2 , 2 ], [2 , 2 , 2 ]]
118118 import_image_data (im_folder , "*.tif" , self .out_path ,
@@ -126,7 +126,7 @@ def test_import_hdf5(self):
126126 from mobie .import_data import import_image_data
127127 test_path , key , data = self .create_h5_input_data ()
128128 scales = [[2 , 2 , 2 ], [2 , 2 , 2 ], [2 , 2 , 2 ]]
129- resolution = (1 , 1 , 1 )
129+ resolution = (1 , 1 , 1 )
130130 import_image_data (test_path , key , self .out_path ,
131131 resolution = resolution , chunks = (32 , 32 , 32 ),
132132 scale_factors = scales , tmp_folder = self .tmp_folder ,
0 commit comments