tools/test: Don't count unexpected successes as errors
If unexpected successes are count as a failure, it means that the
decorator cannot be used to mask unreliably failing tests.
@@ -585,6 +585,10 @@ class ParallelTextTestResult(unittest.result.TestResult):
wmsg.line
)))
+ def wasSuccessful(self):
+ # Overload TestResult.wasSuccessful to ignore unexpected successes
+ return (len(self.failures) == len(self.errors) == 0)
+
class ParallelTextTestRunner:
