MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_startTest

Method test_startTest

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

startTestMethod · 0.95
wasSuccessfulMethod · 0.95
stopTestMethod · 0.95
lenFunction · 0.85
assertTrueMethod · 0.80
FooClass · 0.70
assertEqualMethod · 0.45

Tested by

no test coverage detected