File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -6441,6 +6441,17 @@ def __create_log_path_as_needed(self, test_logpath):
6441
6441
except Exception :
6442
6442
pass # Only reachable during multi-threaded runs
6443
6443
6444
+ def has_exception (self ):
6445
+ """ (This method should ONLY be used in custom tearDown() methods.)
6446
+ This method returns True if the test failed or raised an exception.
6447
+ This is useful for performing additional steps in your tearDown()
6448
+ method (based on whether or not the test passed or failed).
6449
+ Example use cases:
6450
+ * Performing cleanup steps if a test didn't complete.
6451
+ * Sending test data and/or results to a dashboard service.
6452
+ """
6453
+ return self .__has_exception ()
6454
+
6444
6455
def save_teardown_screenshot (self ):
6445
6456
""" (Should ONLY be used at the start of custom tearDown() methods.)
6446
6457
This method takes a screenshot of the current web page for a
You can’t perform that action at this time.
0 commit comments