Skip to content

Commit

Permalink
[core/windows] Fix tests for sys.executable with spaces (Fix for 64…
Browse files Browse the repository at this point in the history
…76645)

Authored by: Grub4K
  • Loading branch information
Grub4K committed Apr 28, 2024
1 parent 6476645 commit 7e26bd5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2090,10 +2090,7 @@ def run_shell(args):

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__':
Expand Down

0 comments on commit 7e26bd5

Please sign in to comment.