Commit f78f5b11 authored by Michael Foord's avatar Michael Foord

Correction to issue 17052 fix

parent 8fd396bd
...@@ -199,7 +199,7 @@ class TestProgram(object): ...@@ -199,7 +199,7 @@ class TestProgram(object):
def _do_discovery(self, argv, Loader=None): def _do_discovery(self, argv, Loader=None):
if Loader is None: if Loader is None:
Loader = self.testLoader Loader = lambda: self.testLoader
# handle command line args for test discovery # handle command line args for test discovery
self.progName = '%s discover' % self.progName self.progName = '%s discover' % self.progName
......
...@@ -269,7 +269,7 @@ class TestDiscovery(unittest.TestCase): ...@@ -269,7 +269,7 @@ class TestDiscovery(unittest.TestCase):
self.args.append((start_dir, pattern, top_level_dir)) self.args.append((start_dir, pattern, top_level_dir))
return 'tests' return 'tests'
program.testLoader = Loader program.testLoader = Loader()
program._do_discovery(['-v']) program._do_discovery(['-v'])
self.assertEqual(Loader.args, [('.', 'test*.py', None)]) self.assertEqual(Loader.args, [('.', 'test*.py', None)])
......
...@@ -221,7 +221,7 @@ Core and Builtins ...@@ -221,7 +221,7 @@ Core and Builtins
Library 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. - Issue #17141: random.vonmisesvariate() no more hangs for large kappas.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment