Patchwork D3898: run-tests: fix test result verbosity

login
register
mail settings
Submitter phabricator
Date July 10, 2018, 6:26 a.m.
Message ID <differential-rev-PHID-DREV-nrekctdwjqicedglrms3-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/32728/
State Superseded
Headers show

Comments

phabricator - July 10, 2018, 6:26 a.m.
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  A previous refactoring created the test result with a verbosity of 0 hiding
  some of the outputs in the normal case.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D3898

AFFECTED FILES
  tests/run-tests.py

CHANGE DETAILS




To: lothiraldan, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -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)