gh-109706: Fix multiprocessing test_nested_startmethod() (#109707)

Don't check order, queue items can be written in any order.
This commit is contained in:
Victor Stinner 2023-09-22 23:49:32 +02:00 committed by GitHub
parent d5611f2804
commit b03a791497
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -5472,7 +5472,9 @@ class TestStartMethod(unittest.TestCase):
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",