summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2013-02-11 13:20:52 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2013-02-11 13:20:52 (GMT)
commitf78f5b11f65ff6fd582d937615e8a1c3c8373662 (patch)
tree1807b2def229e35031df9fd532a4ff4856f287a7 /Lib
parent8fd396bd227ba35e0da477e5eef70e85700f186c (diff)
downloadcpython-f78f5b11f65ff6fd582d937615e8a1c3c8373662.zip
cpython-f78f5b11f65ff6fd582d937615e8a1c3c8373662.tar.gz
cpython-f78f5b11f65ff6fd582d937615e8a1c3c8373662.tar.bz2
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 d09bccd..63c8139 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 eba269f..1fdf991 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)])