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

Method test_timeout

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

Source from the content-addressed store, hash-verified

93 self.assertIn('Run Python regression tests.', out.getvalue())
94
95 def test_timeout(self):
96 ns = self.parse_args(['--timeout', '4.2'])
97 self.assertEqual(ns.timeout, 4.2)
98
99 # negative, zero and empty string are treated as "no timeout"
100 for value in ('-1', '0', ''):
101 with self.subTest(value=value):
102 ns = self.parse_args([f'--timeout={value}'])
103 self.assertEqual(ns.timeout, None)
104
105 self.checkError(['--timeout'], 'expected one argument')
106 self.checkError(['--timeout', 'foo'], 'invalid timeout value:')
107
108 def test_wait(self):
109 ns = self.parse_args(['--wait'])

Callers

nothing calls this directly

Calls 4

parse_argsMethod · 0.95
checkErrorMethod · 0.95
assertEqualMethod · 0.45
subTestMethod · 0.45

Tested by

no test coverage detected