Commit 48298a70 authored by Sebastien Robin's avatar Sebastien Robin

Revert "Mark test as FAILED in case of "unexpected success"

This reverts commit ddcb5001.

This commit itself is good. But some more work is needed to
check failures that were hidden
parent b64a9c8d
...@@ -332,12 +332,11 @@ class ERP5TypeTestSuite(TestSuite): ...@@ -332,12 +332,11 @@ class ERP5TypeTestSuite(TestSuite):
search = self.STATUS_RE.search(test_log) search = self.STATUS_RE.search(test_log)
if search: if search:
groupdict = search.groupdict() groupdict = search.groupdict()
status_dict.update( status_dict.update(error_count=int(groupdict['errors'] or 0),
error_count=int(groupdict['errors'] or 0), failure_count=int(groupdict['failures'] or 0),
failure_count=int(groupdict['failures'] or 0)
+int(groupdict['unexpected_successes'] or 0),
skip_count=int(groupdict['skips'] or 0) skip_count=int(groupdict['skips'] or 0)
+int(groupdict['expected_failures'] or 0)) +int(groupdict['expected_failures'] or 0)
+int(groupdict['unexpected_successes'] or 0))
return status_dict return status_dict
......
...@@ -233,12 +233,11 @@ class ERP5TypeTestSuite(TestSuite): ...@@ -233,12 +233,11 @@ class ERP5TypeTestSuite(TestSuite):
search = self.STATUS_RE.search(test_log) search = self.STATUS_RE.search(test_log)
if search: if search:
groupdict = search.groupdict() groupdict = search.groupdict()
status_dict.update( status_dict.update(error_count=int(groupdict['errors'] or 0),
error_count=int(groupdict['errors'] or 0), failure_count=int(groupdict['failures'] or 0),
failure_count=int(groupdict['failures'] or 0)
+int(groupdict['unexpected_successes'] or 0),
skip_count=int(groupdict['skips'] or 0) skip_count=int(groupdict['skips'] or 0)
+int(groupdict['expected_failures'] or 0)) +int(groupdict['expected_failures'] or 0)
+int(groupdict['unexpected_successes'] or 0))
return status_dict return status_dict
class ProjectTestSuite(ERP5TypeTestSuite): class ProjectTestSuite(ERP5TypeTestSuite):
......
...@@ -207,10 +207,6 @@ class _TextTestResult(unittest._TextTestResult, TestResult): ...@@ -207,10 +207,6 @@ class _TextTestResult(unittest._TextTestResult, TestResult):
unittest._TextTestResult.__init__(self, stream, descriptions, verbosity) unittest._TextTestResult.__init__(self, stream, descriptions, verbosity)
TestResult.__init__(self) TestResult.__init__(self)
def wasSuccessful(self):
"Tells whether or not this result was a success"
return not (self.failures or self.errors or self.unexpectedSuccesses)
def addSkip(self, test, reason): def addSkip(self, test, reason):
super(_TextTestResult, self).addSkip(test, reason) super(_TextTestResult, self).addSkip(test, reason)
if self.showAll: if self.showAll:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment