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

Method test_timeout

Lib/test/test_subprocess.py:1815–1821  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1813 self.assertEqual(cp.returncode, 0)
1814
1815 def test_timeout(self):
1816 # run() function with timeout argument; we want to test that the child
1817 # process gets killed when the timeout expires. If the child isn't
1818 # killed, this call will deadlock since subprocess.run waits for the
1819 # child.
1820 with self.assertRaises(subprocess.TimeoutExpired):
1821 self.run_python("while True: pass", timeout=0.0001)
1822
1823 def test_capture_stdout(self):
1824 # capture stdout with zero return code

Callers

nothing calls this directly

Calls 2

run_pythonMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected