[PATCH 3 of 5] tests: remove WarnTest
Gregory Szorc
gregory.szorc at gmail.com
Tue Jun 20 06:12:51 UTC 2017
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1496535215 25200
# Sat Jun 03 17:13:35 2017 -0700
# Node ID 4c61550023c9ea3ed229e34de40381a308bf9bc0
# Parent fbcdbd62401f8578e05974b83fe604f89f221c62
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."""
More information about the Mercurial-devel
mailing list