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

Method test_wait_result

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

Source from the content-addressed store, hash-verified

1864 os.kill(pid, signal.SIGINT)
1865
1866 def test_wait_result(self):
1867 if isinstance(self, ProcessesMixin) and sys.platform != 'win32':
1868 pid = os.getpid()
1869 else:
1870 pid = None
1871
1872 c = self.Condition()
1873 with c:
1874 self.assertFalse(c.wait(0))
1875 self.assertFalse(c.wait(0.1))
1876
1877 p = self.Process(target=self._test_wait_result, args=(c, pid))
1878 p.start()
1879
1880 self.assertTrue(c.wait(60))
1881 if pid is not None:
1882 self.assertRaises(KeyboardInterrupt, c.wait, 60)
1883
1884 p.join()
1885
1886
1887class _TestEvent(BaseTestCase):

Callers

nothing calls this directly

Calls 9

waitMethod · 0.95
isinstanceFunction · 0.85
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