diff --git a/tests/system_tests.py b/tests/system_tests.py index aba6fc6747..bfc9024d24 100644 --- a/tests/system_tests.py +++ b/tests/system_tests.py @@ -5,7 +5,6 @@ import inspect import subprocess import threading -import shlex import sys import shutil import string @@ -13,22 +12,10 @@ if sys.platform == 'win32': - #: invoke subprocess.Popen with shell=True on Windows - _SUBPROCESS_SHELL = True - - def _cmd_splitter(cmd): - return cmd - def _process_output_post(output): return output.replace('\r\n', '\n') else: - #: invoke subprocess.Popen with shell=False on Unix - _SUBPROCESS_SHELL = False - - def _cmd_splitter(cmd): - return shlex.split(cmd) - def _process_output_post(output): return output @@ -551,13 +538,13 @@ def test_run(self): ) proc = subprocess.Popen( - _cmd_splitter(command), + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE if stdin is not None else None, env=self._get_env(), cwd=self.work_dir, - shell=_SUBPROCESS_SHELL + shell=True, ) # Setup a threading.Timer which will terminate the command if it takes