(self)
| 234 | |
| 235 | # "Add a TestCase ... to the suite" |
| 236 | def test_addTest__TestCase(self): |
| 237 | class Foo(unittest.TestCase): |
| 238 | def test(self): pass |
| 239 | |
| 240 | test = Foo('test') |
| 241 | suite = unittest.TestSuite() |
| 242 | |
| 243 | suite.addTest(test) |
| 244 | |
| 245 | self.assertEqual(suite.countTestCases(), 1) |
| 246 | self.assertEqual(list(suite), [test]) |
| 247 | # countTestCases() still works after tests are run |
| 248 | suite.run(unittest.TestResult()) |
| 249 | self.assertEqual(suite.countTestCases(), 1) |
| 250 | |
| 251 | # "Add a ... TestSuite to the suite" |
| 252 | def test_addTest__TestSuite(self): |
nothing calls this directly
no test coverage detected