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

Method test_wait_result

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

Source from the content-addressed store, hash-verified

2067
2068 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2069 def test_wait_result(self):
2070 if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
2071 pid = os.getpid()
2072 else:
2073 pid = None
2074
2075 c = self.Condition()
2076 with c:
2077 self.assertFalse(c.wait(0))
2078 self.assertFalse(c.wait(0.1))
2079
2080 p = self.Process(target=self._test_wait_result, args=(c, pid))
2081 p.start()
2082
2083 self.assertTrue(c.wait(60))
2084 if pid is not None:
2085 self.assertRaises(KeyboardInterrupt, c.wait, 60)
2086
2087 p.join()
2088
2089
2090class _TestEvent(BaseTestCase):

Callers

nothing calls this directly

Calls 8

waitMethod · 0.95
assertFalseMethod · 0.80
assertTrueMethod · 0.80
ConditionMethod · 0.45
ProcessMethod · 0.45
startMethod · 0.45
assertRaisesMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected