run-tests: checks behaviour of test on failure while testing
authoranuraggoel <anurag.dsps@gmail.com>
Fri, 13 Jun 2014 14:33:02 +0530
changeset 21753 b7baef94a333
parent 21751 c5699c2d690b
child 21754 7e14d026c4c4
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'.
tests/run-tests.py
--- 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: