changeset 38620:875e033fbbdd

run-tests: fix test result verbosity A previous refactoring created the test result with a verbosity of 0 hiding some of the outputs in the normal case. Differential Revision: https://phab.mercurial-scm.org/D3898
author Boris Feld <boris.feld@octobus.net>
date Tue, 10 Jul 2018 08:23:46 +0200
parents 9b077e5fa8ba
children f4a214300957
files tests/run-tests.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/run-tests.py	Tue Jun 05 12:04:15 2018 +0200
+++ b/tests/run-tests.py	Tue Jul 10 08:23:46 2018 +0200
@@ -2106,8 +2106,9 @@
         super(TextTestRunner, self).__init__(*args, **kwargs)
 
         self._runner = runner
+
         self._result = getTestResult()(self._runner.options, self.stream,
-                                       self.descriptions, 0)
+                                       self.descriptions, self.verbosity)
 
     def listtests(self, test):
         test = sorted(test, key=lambda t: t.name)
@@ -2740,7 +2741,9 @@
                               showchannels=self.options.showchannels,
                               tests=tests, loadtest=_reloadtest)
             verbosity = 1
-            if self.options.verbose:
+            if self.options.list_tests:
+                verbosity = 0
+            elif self.options.verbose:
                 verbosity = 2
             runner = TextTestRunner(self, verbosity=verbosity)