Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Lib/test/test_asyncio/test_subprocess.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import shlex
import signal
import sys
import textwrap
Expand Down Expand Up @@ -770,9 +771,7 @@ async def check_stdout_output(self, coro, output):

def test_create_subprocess_env_shell(self) -> None:
async def main() -> None:
executable = sys.executable
if sys.platform == "win32":
executable = f'"{executable}"'
executable = f'"{sys.executable}"' if sys.platform == "win32" else shlex.quote(sys.executable)
cmd = f'''{executable} -c "import os, sys; sys.stdout.write(os.getenv('FOO'))"'''
env = os.environ.copy()
env["FOO"] = "bar"
Expand Down
Loading