https://github.com/python/cpython/commit/e89ca3991c740a188006f82ff6ac38627cd5ef22 commit: e89ca3991c740a188006f82ff6ac38627cd5ef22 branch: 3.13 author: Miss Islington (bot) <31488909+miss-isling...@users.noreply.github.com> committer: gpshead <g...@krypto.org> date: 2025-05-05T04:25:41Z summary:
[3.13] [tests] test_subprocess maybe avoid a timeout race condition? (GH-133420) (#133421) [tests] test_subprocess maybe avoid a timeout race condition? (GH-133420) The few buildbot failures on https://github.com/python/cpython/pull/133103 are possibly just due to racing a child process launch and exit? (cherry picked from commit b64aa302d7bc09454ba8d5b19922ff6a4192dd96) Co-authored-by: Gregory P. Smith <g...@krypto.org> files: M Lib/test/test_subprocess.py diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index ba02b1a1c011a1..8b2f48b0fc0119 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -163,13 +163,13 @@ def test_call_timeout(self): def test_timeout_exception(self): try: - subprocess.run(['echo', 'hi'], timeout = -1) + subprocess.run([sys.executable, '-c', 'import time;time.sleep(9)'], timeout = -1) except subprocess.TimeoutExpired as e: self.assertIn("-1 seconds", str(e)) else: self.fail("Expected TimeoutExpired exception not raised") try: - subprocess.run(['echo', 'hi'], timeout = 0) + subprocess.run([sys.executable, '-c', 'import time;time.sleep(9)'], timeout = 0) except subprocess.TimeoutExpired as e: self.assertIn("0 seconds", str(e)) else: _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com