diff options
| author | Victor Stinner <vstinner@python.org> | 2023-09-22 21:49:32 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-22 21:49:32 (GMT) |
| commit | b03a791497ff4b3c42805e06c73d08ac34087402 (patch) | |
| tree | 86858069676d24e045c1894120a1a5310847dbed /Lib/test/_test_multiprocessing.py | |
| parent | d5611f280403d19befe4a3e505b037d286cf798e (diff) | |
| download | cpython-b03a791497ff4b3c42805e06c73d08ac34087402.zip cpython-b03a791497ff4b3c42805e06c73d08ac34087402.tar.gz cpython-b03a791497ff4b3c42805e06c73d08ac34087402.tar.bz2 | |
gh-109706: Fix multiprocessing test_nested_startmethod() (#109707)
Don't check order, queue items can be written in any order.
Diffstat (limited to 'Lib/test/_test_multiprocessing.py')
| -rw-r--r-- | Lib/test/_test_multiprocessing.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py index 2636a9c..730b887 100644 --- a/Lib/test/_test_multiprocessing.py +++ b/Lib/test/_test_multiprocessing.py @@ -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", |
