Skip to content

Commit

Permalink
pythongh-109746: Fix race condition in test_start_new_thread_failed
Browse files Browse the repository at this point in the history
  • Loading branch information
serhiy-storchaka committed Nov 26, 2024
1 parent f46d847 commit 4e74699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/test/test_threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,11 +1196,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'')
Expand Down

0 comments on commit 4e74699

Please sign in to comment.