summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2013-02-11 13:20:52 +0000
committerMichael Foord <michael@voidspace.org.uk>2013-02-11 13:20:52 +0000
commitcbdceedf6bac74c37ec9ed1410d004f4a7918a88 (patch)
treea2a752fd09af4a60e319375b5f76b4c4f66d514a /Lib
parent89a0e03714757dd40f2c23cee0a428fe1118e1a6 (diff)
downloadcpython-cbdceedf6bac74c37ec9ed1410d004f4a7918a88.tar.gz
Correction to issue 17052 fix
Diffstat (limited to 'Lib')
-rw-r--r--Lib/unittest/main.py2
-rw-r--r--Lib/unittest/test/test_discovery.py2
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)])