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

Method check_context

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

Source from the content-addressed store, hash-verified

6015 conn.send(multiprocessing.get_start_method())
6016
6017 def check_context(self, ctx):
6018 r, w = ctx.Pipe(duplex=False)
6019 p = ctx.Process(target=self._check_context, args=(w,))
6020 p.start()
6021 w.close()
6022 child_method = r.recv()
6023 r.close()
6024 p.join()
6025 self.assertEqual(child_method, ctx.get_start_method())
6026
6027 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
6028 def test_context(self):

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