Correction to issue 17052 fix

This commit is contained in:
Michael Foord 2013-02-11 12:53:21 +00:00
parent cb66ee7f56
commit c36bf99189
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)])

View File

@ -202,7 +202,7 @@ Core and Builtins
Library
-------
- Issue #17502: unittest discovery should use self.testLoader.
- Issue #17052: unittest discovery should use self.testLoader.
- Issue #17141: random.vonmisesvariate() no more hangs for large kappas.