gh-109706: Fix multiprocessing test_nested_startmethod() (GH-109707)
Don't check order, queue items can be written in any order.
(cherry picked from commit
b03a791497ff4b3c42805e06c73d08ac34087402)
Co-authored-by: Victor Stinner <vstinner@python.org>
while not queue.empty():
results.append(queue.get())
- self.assertEqual(results, [2, 1])
+ # gh-109706: queue.put(1) can write into the queue before queue.put(2),
+ # there is no synchronization in the test.
+ self.assertSetEqual(set(results), set([2, 1]))
@unittest.skipIf(sys.platform == "win32",