(self)
| 68 | # "Called when the test case test is about to be run. The default |
| 69 | # implementation simply increments the instance's testsRun counter." |
| 70 | def test_startTest(self): |
| 71 | class Foo(unittest.TestCase): |
| 72 | def test_1(self): |
| 73 | pass |
| 74 | |
| 75 | test = Foo('test_1') |
| 76 | |
| 77 | result = unittest.TestResult() |
| 78 | |
| 79 | result.startTest(test) |
| 80 | |
| 81 | self.assertTrue(result.wasSuccessful()) |
| 82 | self.assertEqual(len(result.errors), 0) |
| 83 | self.assertEqual(len(result.failures), 0) |
| 84 | self.assertEqual(result.testsRun, 1) |
| 85 | self.assertEqual(result.shouldStop, False) |
| 86 | |
| 87 | result.stopTest(test) |
| 88 | |
| 89 | # "Called after the test case test has been executed, regardless of |
| 90 | # the outcome. The default implementation does nothing." |
nothing calls this directly
no test coverage detected