File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -15304,11 +15304,11 @@ def __activate_sb_mgr_post_mortem_debug_mode(self):
15304
15304
# Post Mortem Debug Mode ("python --pdb")
15305
15305
15306
15306
def __activate_debug_mode_in_teardown(self):
15307
- """Activate Debug Mode in tearDown() when using "--final-debug". """
15307
+ """Activate Final Trace / Debug Mode """
15308
15308
import pdb
15309
15309
15310
15310
pdb.set_trace()
15311
- # Final Debug Mode ("--final-debug ")
15311
+ # Final Trace ("--ftrace ")
15312
15312
15313
15313
def has_exception(self):
15314
15314
"""(This method should ONLY be used in custom tearDown() methods.)
@@ -15803,6 +15803,11 @@ def tearDown(self):
15803
15803
and sb_config._do_sb_post_mortem
15804
15804
):
15805
15805
self.__activate_sb_mgr_post_mortem_debug_mode()
15806
+ elif (
15807
+ hasattr(sb_config, "_do_sb_final_trace")
15808
+ and sb_config._do_sb_final_trace
15809
+ ):
15810
+ self.__activate_debug_mode_in_teardown()
15806
15811
# (Pynose / Behave / Pure Python) Close all open browser windows
15807
15812
self.__quit_all_drivers()
15808
15813
# Resume tearDown() for all test runners, (Pytest / Pynose / Behave)
Original file line number Diff line number Diff line change @@ -873,6 +873,13 @@ def SB(
873
873
finally :
874
874
if sb ._has_failure and "--pdb" in sys_argv :
875
875
sb_config ._do_sb_post_mortem = True
876
+ elif (
877
+ "--final-debug" in sys_argv
878
+ or "--final-trace" in sys_argv
879
+ or "--fdebug" in sys_argv
880
+ or "--ftrace" in sys_argv
881
+ ):
882
+ sb_config ._do_sb_final_trace = True
876
883
try :
877
884
sb .tearDown ()
878
885
except Exception as t_e :
You can’t perform that action at this time.
0 commit comments