MCPcopy Index your code
hub / github.com/python/cpython / test_addSuccess

Method test_addSuccess

Lib/test/test_unittest/test_result.py:142–159  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

140 # methods. Contains formatted tracebacks instead
141 # of sys.exc_info() results."
142 def test_addSuccess(self):
143 class Foo(unittest.TestCase):
144 def test_1(self):
145 pass
146
147 test = Foo('test_1')
148
149 result = unittest.TestResult()
150
151 result.startTest(test)
152 result.addSuccess(test)
153 result.stopTest(test)
154
155 self.assertTrue(result.wasSuccessful())
156 self.assertEqual(len(result.errors), 0)
157 self.assertEqual(len(result.failures), 0)
158 self.assertEqual(result.testsRun, 1)
159 self.assertEqual(result.shouldStop, False)
160
161 # "addFailure(test, err)"
162 # ...

Callers

nothing calls this directly

Calls 7

startTestMethod · 0.95
addSuccessMethod · 0.95
stopTestMethod · 0.95
wasSuccessfulMethod · 0.95
assertTrueMethod · 0.80
FooClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected