From: Serhiy Storchaka Date: Wed, 27 Nov 2024 11:29:50 +0000 (+0200) Subject: gh-109746: Fix race condition in test_start_new_thread_failed (GH-127299) X-Git-Tag: v3.14.0a3~192 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83926d3b4c7847394b5e2531e9566d7fc9fbea0f;p=thirdparty%2FPython%2Fcpython.git gh-109746: Fix race condition in test_start_new_thread_failed (GH-127299) --- diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index fb6d268e5869..b666533466e5 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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'')