]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-109746: Fix race condition in test_start_new_thread_failed (GH-127299)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 27 Nov 2024 11:29:50 +0000 (13:29 +0200)
committerGitHub <noreply@github.com>
Wed, 27 Nov 2024 11:29:50 +0000 (13:29 +0200)
Lib/test/test_threading.py

index fb6d268e5869f4a04c2b2e1c91f61c2d4aac3f88..b666533466e57838f946301cf54a55b70b680d24 100644 (file)
@@ -1196,11 +1196,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'')