diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-06 00:26:13 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-06 00:26:13 (GMT) |
commit | 41647d6dad0bcee398cdacb2901b0dd96f2ad08e (patch) | |
tree | 1017de2284bc65c78cc3ed218b0ec9bb2d8f39eb /Lib/unittest/loader.py | |
parent | b112a41aa305ca16159ab60d916f0fb958db9d51 (diff) | |
download | cpython-41647d6dad0bcee398cdacb2901b0dd96f2ad08e.zip cpython-41647d6dad0bcee398cdacb2901b0dd96f2ad08e.tar.gz cpython-41647d6dad0bcee398cdacb2901b0dd96f2ad08e.tar.bz2 |
Merged revisions 78010 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78010 | michael.foord | 2010-02-06 00:22:26 +0000 (Sat, 06 Feb 2010) | 1 line
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
........
Diffstat (limited to 'Lib/unittest/loader.py')
-rw-r--r-- | Lib/unittest/loader.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/unittest/loader.py b/Lib/unittest/loader.py index 68f954c..bfee3dc 100644 --- a/Lib/unittest/loader.py +++ b/Lib/unittest/loader.py @@ -61,9 +61,10 @@ class TestLoader(object): tests.append(self.loadTestsFromTestCase(obj)) load_tests = getattr(module, 'load_tests', None) + tests = self.suiteClass(tests) if use_load_tests and load_tests is not None: return load_tests(self, tests, None) - return self.suiteClass(tests) + return tests def loadTestsFromName(self, name, module=None): """Return a suite of all tests cases given a string specifier. |