summaryrefslogtreecommitdiff
path: root/Lib/unittest/main.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2013-02-10 23:59:46 +0000
committerMichael Foord <michael@voidspace.org.uk>2013-02-10 23:59:46 +0000
commitcb66ee7f56fe66d4b4cb7bc6abe6e1314e98b5c9 (patch)
treeae5778d85c5fad29f616c33cb6344eddd6d74f54 /Lib/unittest/main.py
parent65d56390bbf74553221dd94123c9f04776c6f8cb (diff)
downloadcpython-git-cb66ee7f56fe66d4b4cb7bc6abe6e1314e98b5c9.tar.gz
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 3396bb0ab6..1e001a6a26 100644
--- a/Lib/unittest/main.py
+++ b/Lib/unittest/main.py
@@ -157,7 +157,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