mirror of https://github.com/python/cpython
Correction to issue 17052 fix
This commit is contained in:
parent
cb66ee7f56
commit
c36bf99189
|
@ -159,7 +159,7 @@ class TestProgram(object):
|
|||
|
||||
def _do_discovery(self, argv, Loader=None):
|
||||
if Loader is None:
|
||||
Loader = self.testLoader
|
||||
Loader = lambda: self.testLoader
|
||||
|
||||
# handle command line args for test discovery
|
||||
self.progName = '%s discover' % self.progName
|
||||
|
|
|
@ -236,7 +236,7 @@ class TestDiscovery(unittest.TestCase):
|
|||
self.args.append((start_dir, pattern, top_level_dir))
|
||||
return 'tests'
|
||||
|
||||
program.testLoader = Loader
|
||||
program.testLoader = Loader()
|
||||
program._do_discovery(['-v'])
|
||||
self.assertEqual(Loader.args, [('.', 'test*.py', None)])
|
||||
|
||||
|
|
Loading…
Reference in New Issue