# HG changeset patch # User Gregory Szorc # Date 2017-06-04 00:13:35 # Node ID 6123a52671197037074eb96a6abd1f19eb7294a4 # Parent f83b7376a300faa301d39c4ed30c02258f41af66 tests: remove WarnTest We would raise this if a test didn't return a result code. AFAICT this can only occur if there is a logic error in the test harness itself. I don't think it is worth the code complexity to distinguish this failure scenario from a regular test failure. diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -717,8 +717,6 @@ class Test(unittest.TestCase): # test we "ran", but we want to exclude skipped tests # from those we count towards those run. result.testsRun -= 1 - except WarnTest as e: - result.addWarn(self, str(e)) except ReportedTest as e: pass except self.failureException as e: @@ -788,7 +786,7 @@ class Test(unittest.TestCase): elif ret == 'timeout': self.fail('timed out') elif ret is False: - raise WarnTest('no result code from test') + self.fail('no result code from test') elif out != self._refout: # Diff generation may rely on written .err file. if (ret != 0 or out != self._refout) and not self._skipped \ @@ -1481,9 +1479,6 @@ class TTest(Test): iolock = threading.RLock() -class WarnTest(Exception): - """Raised to indicate that a test warned.""" - class ReportedTest(Exception): """Raised to indicate that a test already reported."""