]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.14] Fix multiprocessing queue test_get() (GH-142024) (#142070)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 29 Nov 2025 07:25:46 +0000 (08:25 +0100)
committerGitHub <noreply@github.com>
Sat, 29 Nov 2025 07:25:46 +0000 (07:25 +0000)
commit20b910ca8b6b1ad4593411999832f7e1c563acb9
treeb76e3d1ed673325387fe0cbbb8e9efd597cf6480
parent23d771a5de04fe05e43021d48ae8219a224132ed
[3.14] Fix multiprocessing queue test_get() (GH-142024) (#142070)

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