@@ -221,7 +221,7 @@ class TestHapiBinaryCodec(unittest.TestCase):
221221 )
222222 @unpack
223223 def test_load_headers (self , fname , var_name , unit , description ):
224- with open (os .path .join (__HERE__ , 'resources' , fname ), 'br ' ) as f :
224+ with open (os .path .join (__HERE__ , 'resources' , fname ), 'rb ' ) as f :
225225 headers = hapi_binary .reader ._extract_headers (f )
226226 time_param = headers ['parameters' ][0 ]
227227 self .assertEqual (time_param ['units' ], 'UTC' )
@@ -258,7 +258,7 @@ def test_load_multiple_variables(self):
258258 fname = "HAPI_amda_imf_all.binary"
259259 file = str (os .path .join (__HERE__ , 'resources' , fname ))
260260 var_names = ["imf_mag" , "imf" ]
261- with open (file , 'br ' ) as f :
261+ with open (file , 'rb ' ) as f :
262262 variables = hapi_binary_codec .load_variables (file = f , variables = var_names , disable_cache = True )
263263 self .assertEqual (len (variables ), len (var_names ))
264264 for v in variables .values ():
@@ -273,7 +273,7 @@ def test_load_multiple_variables(self):
273273
274274 def test_load_time_independent_axis (self ):
275275 hapi_binary_codec : CodecInterface = get_codec ('hapi/binary' )
276- with open (os .path .join (__HERE__ , 'resources' , 'HAPI_ndData_TimeIndependent_Axis.binary' ), 'br ' ) as f :
276+ with open (os .path .join (__HERE__ , 'resources' , 'HAPI_ndData_TimeIndependent_Axis.binary' ), 'rb ' ) as f :
277277 variables = hapi_binary_codec .load_variables (file = f , variables = ['ace_epam_de_e' ], disable_cache = True )
278278 self .assertIn ('ace_epam_de_e' , variables )
279279 v : SpeasyVariable = variables ['ace_epam_de_e' ]
@@ -310,7 +310,7 @@ def test_spz_getdata_to_binary(self):
310310
311311 def test_save_time_varying_axis (self ):
312312 hapi_binary_codec : CodecInterface = get_codec ('hapi/binary' )
313- with open (os .path .join (__HERE__ , 'resources' , 'HAPI_ndData_TimeVarying_Axis.binary' ), 'br ' ) as f :
313+ with open (os .path .join (__HERE__ , 'resources' , 'HAPI_ndData_TimeVarying_Axis.binary' ), 'rb ' ) as f :
314314 # read to generate spz_vars
315315 var_name = 'spectra_time_dependent_bins'
316316 variables = hapi_binary_codec .load_variables (file = f , variables = [var_name ], disable_cache = True )
0 commit comments