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

Method test_interrupt

Lib/test/_test_multiprocessing.py:648–653  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

646 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
647 @unittest.skipIf(os.name == 'nt', "POSIX only")
648 def test_interrupt(self):
649 exitcode = self._kill_process(multiprocessing.Process.interrupt)
650 self.assertEqual(exitcode, 1)
651 # exit code 1 is hard-coded for uncaught exceptions
652 # (KeyboardInterrupt in this case)
653 # in multiprocessing.BaseProcess._bootstrap
654
655 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
656 @unittest.skipIf(os.name == 'nt', "POSIX only")

Callers

nothing calls this directly

Calls 2

_kill_processMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected