]> jfr.im git - yt-dlp.git/commitdiff
[core/windows] Fix tests for `sys.executable` with spaces (Fix for 64766459e37451b665...
authorSimon Sawicki <redacted>
Sun, 28 Apr 2024 13:44:46 +0000 (15:44 +0200)
committerSimon Sawicki <redacted>
Sun, 28 Apr 2024 13:47:55 +0000 (15:47 +0200)
Authored by: Grub4K

test/test_utils.py

index 824864577dc0ae4258abce3d46910d9cecbcbb4f..816cf03f6b6abb41bf0b1095c9bc22b609fa7739 100644 (file)
@@ -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__':