mirror of
https://github.com/python/cpython.git
synced 2025-08-22 01:35:16 +00:00
Issue 17502: unittest discovery should use self.testLoader
This commit is contained in:
parent
6c22b1d760
commit
8fd396bd22
3 changed files with 20 additions and 1 deletions
|
@ -197,7 +197,10 @@ class TestProgram(object):
|
|||
self.test = self.testLoader.loadTestsFromNames(self.testNames,
|
||||
self.module)
|
||||
|
||||
def _do_discovery(self, argv, Loader=loader.TestLoader):
|
||||
def _do_discovery(self, argv, Loader=None):
|
||||
if Loader is None:
|
||||
Loader = self.testLoader
|
||||
|
||||
# handle command line args for test discovery
|
||||
self.progName = '%s discover' % self.progName
|
||||
import optparse
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue