From 6d68b955431138903f257266a96d0c708eafb6f9 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 27 Nov 2024 13:29:50 +0200 Subject: [PATCH] gh-109746: Fix race condition in test_start_new_thread_failed (GH-127299) (cherry picked from commit 83926d3b4c7847394b5e2531e9566d7fc9fbea0f) Co-authored-by: Serhiy Storchaka --- Lib/test/test_threading.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 183af7c1f0836f..75a56f7830bead 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -1175,11 +1175,11 @@ def f(): 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'')