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

Method test_context

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

Source from the content-addressed store, hash-verified

3927 p.join()
3928
3929 def test_context(self):
3930 a, b = self.Pipe()
3931
3932 with a, b:
3933 a.send(1729)
3934 self.assertEqual(b.recv(), 1729)
3935 if self.TYPE == 'processes':
3936 self.assertFalse(a.closed)
3937 self.assertFalse(b.closed)
3938
3939 if self.TYPE == 'processes':
3940 self.assertTrue(a.closed)
3941 self.assertTrue(b.closed)
3942 self.assertRaises(OSError, a.recv)
3943 self.assertRaises(OSError, b.recv)
3944
3945 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3946 def test_wait_empty(self):

Callers

nothing calls this directly

Calls 7

PipeMethod · 0.80
assertFalseMethod · 0.80
assertTrueMethod · 0.80
sendMethod · 0.45
assertEqualMethod · 0.45
recvMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected