From 0b821764d816843b4dd5f9c95f86d7d892abeaec Mon Sep 17 00:00:00 2001 From: Ryan Saunders Date: Sun, 14 Aug 2022 15:26:17 -0700 Subject: Remove unnecessary escaping from runtest.py --- runtest.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/runtest.py b/runtest.py index c05e1c173..212d0a8a1 100755 --- a/runtest.py +++ b/runtest.py @@ -22,7 +22,6 @@ performs test discovery and processes tests according to options. import argparse import glob import os -import re import stat import subprocess import sys @@ -311,15 +310,6 @@ if sys.platform == 'win32': return buf.value -_ws = re.compile(r'\s') - -def escape(s): - if _ws.search(s): - s = '"' + s + '"' - s = s.replace('\\', '\\\\') - return s - - if not catch_output: # Without any output suppressed, we let the subprocess # write its stuff freely to stdout/stderr. @@ -784,7 +774,7 @@ def run_test(t, io_lock=None, run_async=True): if args.runner and t.path in unittests: # For example --runner TestUnit.TAPTestRunner command_args.append('--runner ' + args.runner) - t.command_args = [escape(args.python)] + command_args + t.command_args = [args.python] + command_args t.command_str = " ".join(t.command_args) if args.printcommand: if args.print_progress: -- cgit v1.2.1