@@ -88,6 +88,7 @@ def compare_image(self, nb_messages, filename):
8888 except Exception :
8989 WebSocketTimeoutException = Exception # fallback
9090 import time
91+
9192 self .ws .settimeout (4.0 )
9293 image = None
9394 deadline = time .time () + 12.0
@@ -101,7 +102,9 @@ def compare_image(self, nb_messages, filename):
101102 break
102103 if not isinstance (image , bytes ):
103104 return False
104- test_file_path = os .path .abspath (os .path .join (self .test_output_dir , "test.jpeg" ))
105+ test_file_path = os .path .abspath (
106+ os .path .join (self .test_output_dir , "test.jpeg" )
107+ )
105108 with open (test_file_path , "wb" ) as f :
106109 f .write (image )
107110 format = "jpeg"
@@ -115,7 +118,9 @@ def compare_image(self, nb_messages, filename):
115118 pass
116119
117120 if format != "jpeg" :
118- new_path = os .path .abspath (os .path .join (self .test_output_dir , f"test.{ format } " ))
121+ new_path = os .path .abspath (
122+ os .path .join (self .test_output_dir , f"test.{ format } " )
123+ )
119124 os .replace (test_file_path , new_path )
120125 test_file_path = new_path
121126
@@ -319,7 +324,9 @@ def dataset_factory() -> Callable[..., str]:
319324 base_path = os .path .dirname (__file__ )
320325 src_data = os .path .join (base_path , "data" )
321326 data_root = os .environ .get ("DATA_FOLDER_PATH" )
322- assert data_root , "DATA_FOLDER_PATH non défini (assurez-vous que test_config a été appelé)"
327+ assert (
328+ data_root
329+ ), "DATA_FOLDER_PATH non défini (assurez-vous que test_config a été appelé)"
323330
324331 def create_dataset (
325332 * ,
@@ -372,7 +379,9 @@ def _copy_asset(fname: str):
372379 row .native_file_name = native_file_name or row .native_file_name
373380 row .viewable_file_name = viewable_file_name or row .viewable_file_name
374381 row .geode_object = geode_object or row .geode_object
375- row .light_viewable = light_viewable if light_viewable is not None else row .light_viewable
382+ row .light_viewable = (
383+ light_viewable if light_viewable is not None else row .light_viewable
384+ )
376385 row .input_file = input_file or row .input_file
377386 row .additional_files = additional_files or row .additional_files
378387 return id
0 commit comments