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

Method runTests

Lib/test/test_unittest/test_setups.py:16–30  ·  view source on GitHub ↗
(self, *cases)

Source from the content-addressed store, hash-verified

14 return unittest.TextTestRunner(resultclass=resultFactory,
15 stream=io.StringIO())
16 def runTests(self, *cases):
17 suite = unittest.TestSuite()
18 for case in cases:
19 tests = unittest.defaultTestLoader.loadTestsFromTestCase(case)
20 suite.addTests(tests)
21
22 runner = self.getRunner()
23
24 # creating a nested suite exposes some potential bugs
25 realSuite = unittest.TestSuite()
26 realSuite.addTest(suite)
27 # adding empty suites to the end exposes potential bugs
28 suite.addTest(unittest.TestSuite())
29 realSuite.addTest(unittest.TestSuite())
30 return runner.run(realSuite)
31
32 def test_setup_class(self):
33 class Test(unittest.TestCase):

Calls 5

getRunnerMethod · 0.95
loadTestsFromTestCaseMethod · 0.80
addTestsMethod · 0.80
addTestMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected