[core/windows] Fix tests for sys.executable with spaces (Fix for 64766459e3)

Authored by: Grub4K
This commit is contained in:
Simon Sawicki 2024-04-28 15:44:46 +02:00
parent 64766459e3
commit 7e26bd53f9
No known key found for this signature in database

View file

@ -2090,10 +2090,7 @@ Line 1
args = [sys.executable, '-c', 'import sys; print(end=sys.argv[1])', argument, 'end']
assert run_shell(args) == expected
escaped = shell_quote(argument, shell=True)
args = f'{sys.executable} -c "import sys; print(end=sys.argv[1])" {escaped} end'
assert run_shell(args) == expected
assert run_shell(shell_quote(args, shell=True)) == expected
if __name__ == '__main__':