]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-109746: Fix race condition in test_start_new_thread_failed (GH-127299)...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 27 Nov 2024 12:22:32 +0000 (13:22 +0100)
committerGitHub <noreply@github.com>
Wed, 27 Nov 2024 12:22:32 +0000 (12:22 +0000)
(cherry picked from commit 83926d3b4c7847394b5e2531e9566d7fc9fbea0f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_threading.py

index 183af7c1f0836fb0c79908fc15573942470378ad..75a56f7830beadede49da5e9f359eac066f84eef 100644 (file)
@@ -1175,11 +1175,11 @@ class ThreadTests(BaseTestCase):
             except RuntimeError:
                 print('ok')
             else:
-                print('skip')
+                print('!skip!')
         """
         _, out, err = assert_python_ok("-u", "-c", code)
         out = out.strip()
-        if out == b'skip':
+        if b'!skip!' in out:
             self.skipTest('RLIMIT_NPROC had no effect; probably superuser')
         self.assertEqual(out, b'ok')
         self.assertEqual(err, b'')