From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 24 Oct 2022 19:41:10 +0000 (-0700) Subject: GH-98407: fix `test_kill_issue43884` to not leak child processes (GH-98491) X-Git-Tag: v3.11.1~218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3a1eb81abf9494bdb34125eca667d282ae0fca9f;p=thirdparty%2FPython%2Fcpython.git GH-98407: fix `test_kill_issue43884` to not leak child processes (GH-98491) (cherry picked from commit 3b2724abcfef7cbe5bf1717be1bb029e4c6b6600) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> --- diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 7b7df4005631..4c0140d80ba7 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -184,7 +184,10 @@ class SubprocessMixin: self.assertEqual(-signal.SIGKILL, returncode) def test_kill_issue43884(self): - blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"' + if sys.platform == 'win32': + blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(100000000)"' + else: + blocking_shell_command = 'sleep 1; sleep 1' creationflags = 0 if sys.platform == 'win32': from subprocess import CREATE_NEW_PROCESS_GROUP