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

Method test_nested_startmethod

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

Source from the content-addressed store, hash-verified

6173
6174 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
6175 def test_nested_startmethod(self):
6176 # gh-108520: Regression test to ensure that child process can send its
6177 # arguments to another process
6178 queue = multiprocessing.Queue()
6179
6180 process = multiprocessing.Process(target=self._put_two_and_nest_once, args=(queue,))
6181 process.start()
6182 process.join()
6183
6184 results = []
6185 while not queue.empty():
6186 results.append(queue.get())
6187
6188 # gh-109706: queue.put(1) can write into the queue before queue.put(2),
6189 # there is no synchronization in the test.
6190 self.assertSetEqual(set(results), set([2, 1]))
6191
6192
6193@unittest.skipIf(sys.platform == "win32",

Callers

nothing calls this directly

Calls 9

emptyMethod · 0.95
getMethod · 0.95
setFunction · 0.85
QueueMethod · 0.80
assertSetEqualMethod · 0.80
ProcessMethod · 0.45
startMethod · 0.45
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected