diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-06 00:22:26 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-02-06 00:22:26 (GMT) |
commit | 0877060f8690c50865c3840585c6ce285a99c07c (patch) | |
tree | 9f2b263aa0938075b2ac99d23fcf1e188c7df25c /Lib/test | |
parent | 2373926964b799a7d8346169feb8fbbf7f2f8a65 (diff) | |
download | cpython-0877060f8690c50865c3840585c6ce285a99c07c.zip cpython-0877060f8690c50865c3840585c6ce285a99c07c.tar.gz cpython-0877060f8690c50865c3840585c6ce285a99c07c.tar.bz2 |
unittest.TestLoader creates a TestSuite before calling load_tests. Issue 7799.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_unittest.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py index f24117c..8314262 100644 --- a/Lib/test/test_unittest.py +++ b/Lib/test/test_unittest.py @@ -272,12 +272,14 @@ class Test_TestLoader(TestCase): load_tests_args = [] def load_tests(loader, tests, pattern): + self.assertIsInstance(tests, unittest.TestSuite) load_tests_args.extend((loader, tests, pattern)) return tests m.load_tests = load_tests loader = unittest.TestLoader() suite = loader.loadTestsFromModule(m) + self.assertIsInstance(suite, unittest.TestSuite) self.assertEquals(load_tests_args, [loader, suite, None]) load_tests_args = [] |