Skip to content

Commit

Permalink
pythongh-109706: Fix multiprocessing test_nested_startmethod() (pytho…
Browse files Browse the repository at this point in the history
…n#109707)

Don't check order, queue items can be written in any order.
  • Loading branch information
vstinner authored and csm10495 committed Sep 28, 2023
1 parent 199ad02 commit 0066283
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/test/_test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5472,7 +5472,9 @@ def test_nested_startmethod(self):
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",
Expand Down

0 comments on commit 0066283

Please sign in to comment.