Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 32960:5af78c524f34
tests: remove support for warned tests
The previous changeset removed the last caller of addWarn(). So,
we rip out that method and all the code related to tracking warned
tests in the results system.
There was even a comment saying we may want to fold warned tests into
the "failed" state, which is what the previous changeset did.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 03 Jun 2017 17:22:45 -0700 |
parents | 6123a5267119 |
children | 750c3b1bb8a3 |
line wrap: on
line diff
--- a/tests/run-tests.py Tue Jun 20 09:49:43 2017 -0400 +++ b/tests/run-tests.py Sat Jun 03 17:22:45 2017 -0700 @@ -1500,11 +1500,6 @@ # sense to map it into skip some day. self.ignored = [] - # We have a custom "warned" result that isn't present in any Python - # unittest implementation. It is very similar to failed. It may make - # sense to map it into fail some day. - self.warned = [] - self.times = [] self._firststarttime = None # Data stored for the benefit of generating xunit reports. @@ -1559,19 +1554,6 @@ self.testsRun += 1 self.stream.flush() - def addWarn(self, test, reason): - self.warned.append((test, reason)) - - if self._options.first: - self.stop() - - with iolock: - if self.showAll: - self.stream.writeln('warned %s' % reason) - else: - self.stream.write('~') - self.stream.flush() - def addOutputMismatch(self, test, ret, got, expected): """Record a mismatch in test output for a particular test.""" if self.shouldStop: @@ -1922,7 +1904,6 @@ test(result) failed = len(result.failures) - warned = len(result.warned) skipped = len(result.skipped) ignored = len(result.ignored) @@ -1932,8 +1913,6 @@ if not self._runner.options.noskips: for test, msg in result.skipped: self.stream.writeln('Skipped %s: %s' % (test.name, msg)) - for test, msg in result.warned: - self.stream.writeln('Warned %s: %s' % (test.name, msg)) for test, msg in result.failures: self.stream.writeln('Failed %s: %s' % (test.name, msg)) for test, msg in result.errors: @@ -1986,9 +1965,8 @@ '%s %s by %s (%s)' % ( test, verb, dat['node'], dat['summary'])) self.stream.writeln( - '# Ran %d tests, %d skipped, %d warned, %d failed.' - % (result.testsRun, - skipped + ignored, warned, failed)) + '# Ran %d tests, %d skipped, %d failed.' + % (result.testsRun, skipped + ignored, failed)) if failed: self.stream.writeln('python hash seed: %s' % os.environ['PYTHONHASHSEED']) @@ -2402,7 +2380,6 @@ tests = [self._gettest(d, i) for i, d in enumerate(testdescs)] failed = False - warned = False kws = self.options.keywords if kws is not None and PYTHON3: kws = kws.encode('utf-8') @@ -2438,8 +2415,6 @@ if result.failures: failed = True - if result.warned: - warned = True if self.options.anycoverage: self._outputcoverage() @@ -2449,8 +2424,6 @@ if failed: return 1 - if warned: - return 80 def _getport(self, count): port = self._ports.get(count) # do we have a cached entry?