changeset 21753:b7baef94a333

run-tests: checks behaviour of test on failure while testing On failure while testing, if this function "result.addFailure(self, str(e))" returns true then test get 'passed' else count as 'failed'.
author anuraggoel <anurag.dsps@gmail.com>
date Fri, 13 Jun 2014 14:33:02 +0530
parents c5699c2d690b
children 7e14d026c4c4
files tests/run-tests.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Fri Jun 13 17:42:04 2014 -0500
+++ b/tests/run-tests.py	Fri Jun 13 14:33:02 2014 +0530
@@ -469,7 +469,8 @@
                 # the stack trace. This is for historical reasons and
                 # this decision could be revisted in the future,
                 # especially for PythonTest instances.
-                result.addFailure(self, str(e))
+                if result.addFailure(self, str(e)):
+                    success = True
             except Exception:
                 result.addError(self, sys.exc_info())
             else: