diff options
author | Steve Dower <steve.dower@python.org> | 2024-01-25 00:38:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 00:38:34 (GMT) |
commit | c63c6142f9146e1e977f4c824c56e8979e6aca87 (patch) | |
tree | 533131fe205755182bc80c207cdbf3aebf32b7e7 /Lib/test/test_asyncio | |
parent | d5c21c12c17b6e4db2378755af8e3699516da187 (diff) | |
download | cpython-c63c6142f9146e1e977f4c824c56e8979e6aca87.zip cpython-c63c6142f9146e1e977f4c824c56e8979e6aca87.tar.gz cpython-c63c6142f9146e1e977f4c824c56e8979e6aca87.tar.bz2 |
gh-114272: Fix or skip tests that fail due to spaces in paths (GH-114451)
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_subprocess.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_subprocess.py b/Lib/test/test_asyncio/test_subprocess.py index 859d293..808b21c 100644 --- a/Lib/test/test_asyncio/test_subprocess.py +++ b/Lib/test/test_asyncio/test_subprocess.py @@ -207,7 +207,7 @@ class SubprocessMixin: def test_kill_issue43884(self): if sys.platform == 'win32': - blocking_shell_command = f'{sys.executable} -c "import time; time.sleep(2)"' + blocking_shell_command = f'"{sys.executable}" -c "import time; time.sleep(2)"' else: blocking_shell_command = 'sleep 1; sleep 1' creationflags = 0 @@ -745,7 +745,10 @@ class SubprocessMixin: def test_create_subprocess_env_shell(self) -> None: async def main() -> None: - cmd = f'''{sys.executable} -c "import os, sys; sys.stdout.write(os.getenv('FOO'))"''' + executable = sys.executable + if sys.platform == "win32": + executable = f'"{executable}"' + cmd = f'''{executable} -c "import os, sys; sys.stdout.write(os.getenv('FOO'))"''' env = os.environ.copy() env["FOO"] = "bar" proc = await asyncio.create_subprocess_shell( |