FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-109706: Fix multiprocessing test_nested_startmethod() · vstinner/cpython@06aa63b · GitHub

Repository navigation

Commit 06aa63b

Browse files
committed
pythongh-109706: Fix multiprocessing test_nested_startmethod()
Don't check order, queue items can be written in any order.
1 parent 4230d7c commit 06aa63b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎Lib/test/_test_multiprocessing.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5472,7 +5472,9 @@ def test_nested_startmethod(self):
54725472
while not queue.empty():
54735473
results.append(queue.get())
54745474

5475-
self.assertEqual(results, [2, 1])
5475+
# gh-109706: queue.put(1) can write into the queue before queue.put(2),
5476+
# there is no synchronization in the test.
5477+
self.assertSetEqual(set(results), set([2, 1]))
54765478

54775479

54785480
@unittest.skipIf(sys.platform == "win32",

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL