summaryrefslogtreecommitdiff
path: root/ext/testlib/handlers.py
diff options
context:
space:
mode:
Diffstat (limited to 'ext/testlib/handlers.py')
-rw-r--r--ext/testlib/handlers.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/testlib/handlers.py b/ext/testlib/handlers.py
index 7530f9bf1..6f7694071 100644
--- a/ext/testlib/handlers.py
+++ b/ext/testlib/handlers.py
@@ -166,6 +166,18 @@ class ResultHandler(log.Handler):
self._closed = True
self._save()
+ def unsuccessful(self):
+ '''
+ Performs an or reduce on all of the results.
+ Returns true if at least one test is unsuccessful, false when all tests
+ pass
+ '''
+ for suite_result in self.internal_results:
+ if suite_result.unsuccessful:
+ return True
+ # If all are successful, then this wasn't "unsuccessful"
+ return False
+
#TODO Change from a handler to an internal post processor so it can be used
# to reprint results