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

Method test_help

Lib/test/test_regrtest.py:87–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

85 self.assertIn(msg, err.getvalue())
86
87 def test_help(self):
88 for opt in '-h', '--help':
89 with self.subTest(opt=opt):
90 with support.captured_stdout() as out, \
91 self.assertRaises(SystemExit):
92 self.parse_args([opt])
93 self.assertIn('Run Python regression tests.', out.getvalue())
94
95 def test_timeout(self):
96 ns = self.parse_args(['--timeout', '4.2'])

Callers

nothing calls this directly

Calls 5

parse_argsMethod · 0.95
assertInMethod · 0.80
subTestMethod · 0.45
assertRaisesMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected