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

Method test_context

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

Source from the content-addressed store, hash-verified

3638 p.join()
3639
3640 def test_context(self):
3641 a, b = self.Pipe()
3642
3643 with a, b:
3644 a.send(1729)
3645 self.assertEqual(b.recv(), 1729)
3646 if self.TYPE == 'processes':
3647 self.assertFalse(a.closed)
3648 self.assertFalse(b.closed)
3649
3650 if self.TYPE == 'processes':
3651 self.assertTrue(a.closed)
3652 self.assertTrue(b.closed)
3653 self.assertRaises(OSError, a.recv)
3654 self.assertRaises(OSError, b.recv)
3655
3656class _TestListener(BaseTestCase):
3657

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