summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>2022-10-24 23:20:35 +0530
committerGitHub <noreply@github.com>2022-10-24 10:50:35 -0700
commit3b2724abcfef7cbe5bf1717be1bb029e4c6b6600 (patch)
tree7fae388526b435178dae7a1a95d558df47d7670a
parent1a217f9ffc6d014536c08d7fb0136d117b8a0add (diff)
downloadcpython-git-3b2724abcfef7cbe5bf1717be1bb029e4c6b6600.tar.gz
GH-98407: fix `test_kill_issue43884` to not leak child processes (#98491)
-rw-r--r--Lib/test/test_asyncio/test_subprocess.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py
index fe1d060c77..20bca3e6b7 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