From 7e26bd53f9c5893518fde81dfd0079ec08dd841e Mon Sep 17 00:00:00 2001 From: Simon Sawicki Date: Sun, 28 Apr 2024 15:44:46 +0200 Subject: [PATCH] [core/windows] Fix tests for `sys.executable` with spaces (Fix for 64766459e37451b665c1464073c28361fbcf1c25) Authored by: Grub4K --- test/test_utils.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/test_utils.py b/test/test_utils.py index 824864577..816cf03f6 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -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__':