Lines Matching full:suite

51         suite = unittest.TestSuite()
53 self.assertEqual(suite.countTestCases(), 0)
55 suite.run(unittest.TestResult())
56 self.assertEqual(suite.countTestCases(), 0)
61 # or other test suites that will be used to build the suite initially"
64 # creation of an empty suite
66 suite = unittest.TestSuite([])
68 self.assertEqual(suite.countTestCases(), 0)
70 suite.run(unittest.TestResult())
71 self.assertEqual(suite.countTestCases(), 0)
76 # or other test suites that will be used to build the suite initially"
104 # or other test suites that will be used to build the suite initially"
114 suite = unittest.TestSuite(tests())
115 self.assertEqual(suite.countTestCases(), 2)
117 suite.run(unittest.TestResult())
118 self.assertEqual(suite.countTestCases(), 2)
127 suite = unittest.TestSuite((test1, test2))
129 self.assertEqual(list(suite), [test1, test2])
137 suite = unittest.TestSuite()
139 self.assertEqual(suite.countTestCases(), 0)
152 suite = unittest.TestSuite([unittest.TestSuite()])
154 self.assertEqual(suite.countTestCases(), 0)
162 suite = unittest.TestSuite((test1, test2))
164 self.assertEqual(suite.countTestCases(), 2)
166 suite.run(unittest.TestResult())
167 self.assertEqual(suite.countTestCases(), 2)
190 # "Run the tests associated with this suite, collecting the result into
198 suite = unittest.TestSuite()
200 suite.run(result)
207 suite = unittest.TestSuite()
210 suite.run()
216 # "Run the tests associated with this suite, collecting the result into
235 # "Add a TestCase ... to the suite"
241 suite = unittest.TestSuite()
243 suite.addTest(test)
245 self.assertEqual(suite.countTestCases(), 1)
246 self.assertEqual(list(suite), [test])
248 suite.run(unittest.TestResult())
249 self.assertEqual(suite.countTestCases(), 1)
251 # "Add a ... TestSuite to the suite"
258 suite = unittest.TestSuite()
259 suite.addTest(suite_2)
261 self.assertEqual(suite.countTestCases(), 1)
262 self.assertEqual(list(suite), [suite_2])
264 suite.run(unittest.TestResult())
265 self.assertEqual(suite.countTestCases(), 1)
268 # instances to this test suite."
300 # instances to this test suite."
304 suite = unittest.TestSuite()
307 suite.addTests(5)
314 suite = unittest.TestSuite()
315 self.assertRaises(TypeError, suite.addTest, 5)
318 suite = unittest.TestSuite()
319 self.assertRaises(TypeError, suite.addTest, Test_TestSuite)
320 self.assertRaises(TypeError, suite.addTest, unittest.TestSuite)
323 suite = unittest.TestSuite()
324 self.assertRaises(TypeError, suite.addTests, "foo")
329 suite = unittest.TestSuite()
330 suite.addTest(f)
333 suite.run(unittest.TestResult())
337 raise unittest.SkipTest("Suite cleanup is disabled")
339 suite = unittest.TestSuite()
341 suite._tests = [1, 2, 3]
342 suite._removeTestAtIndex(1)
344 self.assertEqual([1, None, 3], suite._tests)
348 raise unittest.SkipTest("Suite cleanup is disabled")
350 suite = unittest.TestSuite()
351 suite._tests = None
354 suite._removeTestAtIndex(2)
358 raise unittest.SkipTest("Suite cleanup is disabled")
367 suite = TestSuiteClass([wref()])
368 suite.run(unittest.TestResult())
375 self.assertEqual(suite._tests, [None])
412 suite = unittest.BaseTestSuite()
413 suite.addTests([Test('testPass'), Test('testFail')])
414 self.assertEqual(suite.countTestCases(), 2)
417 suite.run(result)
425 self.assertEqual(suite.countTestCases(), 2)
435 suite = MySuite()
438 wrapper.addTest(suite)
440 self.assertTrue(suite.called)