summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/main.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2013-02-11 00:04:24 (GMT)
committerMichael Foord <michael@voidspace.org.uk>2013-02-11 00:04:24 (GMT)
commit8fd396bd227ba35e0da477e5eef70e85700f186c (patch)
tree38b317f3cf20e00fb32b1e65951bfd33026dfcf3 /Lib/unittest/main.py
parent6c22b1d7609413f711cb1bcf258ecc13ef15af07 (diff)
downloadcpython-8fd396bd227ba35e0da477e5eef70e85700f186c.zip
cpython-8fd396bd227ba35e0da477e5eef70e85700f186c.tar.gz
cpython-8fd396bd227ba35e0da477e5eef70e85700f186c.tar.bz2
Issue 17502: unittest discovery should use self.testLoader
Diffstat (limited to 'Lib/unittest/main.py')
-rw-r--r--Lib/unittest/main.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/unittest/main.py b/Lib/unittest/main.py
index 55d4e4b..d09bccd 100644
--- a/Lib/unittest/main.py
+++ b/Lib/unittest/main.py
@@ -197,7 +197,10 @@ class TestProgram(object):
self.test = self.testLoader.loadTestsFromNames(self.testNames,
self.module)
- def _do_discovery(self, argv, Loader=loader.TestLoader):
+ def _do_discovery(self, argv, Loader=None):
+ if Loader is None:
+ Loader = self.testLoader
+
# handle command line args for test discovery
self.progName = '%s discover' % self.progName
import optparse