diff options
author | Michael Foord <michael@voidspace.org.uk> | 2013-02-11 13:20:52 +0000 |
---|---|---|
committer | Michael Foord <michael@voidspace.org.uk> | 2013-02-11 13:20:52 +0000 |
commit | cbdceedf6bac74c37ec9ed1410d004f4a7918a88 (patch) | |
tree | a2a752fd09af4a60e319375b5f76b4c4f66d514a /Lib | |
parent | 89a0e03714757dd40f2c23cee0a428fe1118e1a6 (diff) | |
download | cpython-cbdceedf6bac74c37ec9ed1410d004f4a7918a88.tar.gz |
Correction to issue 17052 fix
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/unittest/main.py | 2 | ||||
-rw-r--r-- | Lib/unittest/test/test_discovery.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py index d09bccdf2c..63c8139000 100644 --- a/Lib/unittest/main.py +++ b/Lib/unittest/main.py @@ -199,7 +199,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 diff --git a/Lib/unittest/test/test_discovery.py b/Lib/unittest/test/test_discovery.py index eba269fc7a..1fdf9913c9 100644 --- a/Lib/unittest/test/test_discovery.py +++ b/Lib/unittest/test/test_discovery.py @@ -269,7 +269,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)]) |