tests/run-tests.py
changeset 38620 875e033fbbdd
parent 38617 948691ea92a9
child 38622 fa6edc6a02a9
equal deleted inserted replaced
38619:9b077e5fa8ba 38620:875e033fbbdd
  2104 
  2104 
  2105     def __init__(self, runner, *args, **kwargs):
  2105     def __init__(self, runner, *args, **kwargs):
  2106         super(TextTestRunner, self).__init__(*args, **kwargs)
  2106         super(TextTestRunner, self).__init__(*args, **kwargs)
  2107 
  2107 
  2108         self._runner = runner
  2108         self._runner = runner
       
  2109 
  2109         self._result = getTestResult()(self._runner.options, self.stream,
  2110         self._result = getTestResult()(self._runner.options, self.stream,
  2110                                        self.descriptions, 0)
  2111                                        self.descriptions, self.verbosity)
  2111 
  2112 
  2112     def listtests(self, test):
  2113     def listtests(self, test):
  2113         test = sorted(test, key=lambda t: t.name)
  2114         test = sorted(test, key=lambda t: t.name)
  2114 
  2115 
  2115         self._result.onStart(test)
  2116         self._result.onStart(test)
  2738                               loop=self.options.loop,
  2739                               loop=self.options.loop,
  2739                               runs_per_test=self.options.runs_per_test,
  2740                               runs_per_test=self.options.runs_per_test,
  2740                               showchannels=self.options.showchannels,
  2741                               showchannels=self.options.showchannels,
  2741                               tests=tests, loadtest=_reloadtest)
  2742                               tests=tests, loadtest=_reloadtest)
  2742             verbosity = 1
  2743             verbosity = 1
  2743             if self.options.verbose:
  2744             if self.options.list_tests:
       
  2745                 verbosity = 0
       
  2746             elif self.options.verbose:
  2744                 verbosity = 2
  2747                 verbosity = 2
  2745             runner = TextTestRunner(self, verbosity=verbosity)
  2748             runner = TextTestRunner(self, verbosity=verbosity)
  2746 
  2749 
  2747             if self.options.list_tests:
  2750             if self.options.list_tests:
  2748                 result = runner.listtests(suite)
  2751                 result = runner.listtests(suite)