@@ -3025,12 +3025,19 @@ def tearDown(self):
30253025 self .save_screenshot_after_test ):
30263026 test_logpath = self .log_path + "/" + test_id
30273027 if not os .path .exists (test_logpath ):
3028- os .makedirs (test_logpath )
3028+ try :
3029+ os .makedirs (test_logpath )
3030+ except Exception :
3031+ pass # Only reachable during multi-threaded runs
30293032 log_helper .log_screenshot (test_logpath , self .driver )
3033+ self .__add_pytest_html_extra ()
30303034 if self .with_testing_base and has_exception :
30313035 test_logpath = self .log_path + "/" + test_id
30323036 if not os .path .exists (test_logpath ):
3033- os .makedirs (test_logpath )
3037+ try :
3038+ os .makedirs (test_logpath )
3039+ except Exception :
3040+ pass # Only reachable during multi-threaded runs
30343041 if ((not self .with_screen_shots ) and (
30353042 not self .with_basic_test_info ) and (
30363043 not self .with_page_source )):
@@ -3096,7 +3103,10 @@ def tearDown(self):
30963103 self ._testMethodName )
30973104 test_logpath = "latest_logs/" + test_id
30983105 if not os .path .exists (test_logpath ):
3099- os .makedirs (test_logpath )
3106+ try :
3107+ os .makedirs (test_logpath )
3108+ except Exception :
3109+ pass # Only reachable during multi-threaded runs
31003110 log_helper .log_test_failure_data (
31013111 self , test_logpath , self .driver , self .browser )
31023112 if len (self ._drivers_list ) > 0 :
@@ -3108,7 +3118,10 @@ def tearDown(self):
31083118 self ._testMethodName )
31093119 test_logpath = "latest_logs/" + test_id
31103120 if not os .path .exists (test_logpath ):
3111- os .makedirs (test_logpath )
3121+ try :
3122+ os .makedirs (test_logpath )
3123+ except Exception :
3124+ pass # Only reachable during multi-threaded runs
31123125 log_helper .log_screenshot (test_logpath , self .driver )
31133126 # Finally close all open browser windows
31143127 self .__quit_all_drivers ()
0 commit comments