]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] Fix multiprocessing queue test_get() (GH-142024) (#142071)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 29 Nov 2025 07:22:27 +0000 (08:22 +0100)
committerGitHub <noreply@github.com>
Sat, 29 Nov 2025 07:22:27 +0000 (07:22 +0000)
commitc4df097c41477c76821babc406f357804c9b998d
tree6da6f5700b890367f0b769dfa741e0b6546cb334
parente76192f26024b52707b04870dc9becef68f17be9
[3.13] Fix multiprocessing queue test_get() (GH-142024) (#142071)

Fix multiprocessing queue test_get() (GH-142024)

* Replace sleep() with support.sleeping_retry().
* Test get_nowait() first.
* Restore previously disabled test.

Fix the failure:

FAIL: test_get (test.test_multiprocessing_spawn.test_processes.WithProcessesTestQueue.test_get)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/_test_multiprocessing.py", line 1208, in test_get
    self.assertEqual(queue_empty(queue), False)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: True != False
(cherry picked from commit 5e749d3743621be4c8bf5618ed3249e9fde9a599)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/_test_multiprocessing.py