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

Method check_context

Lib/test/_test_multiprocessing.py:5681–5689  ·  view source on GitHub ↗
(self, ctx)

Source from the content-addressed store, hash-verified

5679 conn.send(multiprocessing.get_start_method())
5680
5681 def check_context(self, ctx):
5682 r, w = ctx.Pipe(duplex=False)
5683 p = ctx.Process(target=self._check_context, args=(w,))
5684 p.start()
5685 w.close()
5686 child_method = r.recv()
5687 r.close()
5688 p.join()
5689 self.assertEqual(child_method, ctx.get_start_method())
5690
5691 def test_context(self):
5692 for method in ('fork', 'spawn', 'forkserver'):

Callers 2

test_contextMethod · 0.95
test_set_getMethod · 0.95

Calls 8

PipeMethod · 0.80
ProcessMethod · 0.45
startMethod · 0.45
closeMethod · 0.45
recvMethod · 0.45
joinMethod · 0.45
assertEqualMethod · 0.45
get_start_methodMethod · 0.45

Tested by

no test coverage detected