mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
gh-114272: Fix or skip tests that fail due to spaces in paths (GH-114451)
This commit is contained in:
parent
d5c21c12c1
commit
c63c6142f9
4 changed files with 45 additions and 25 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue