diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-19 18:52:43 +0000 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-04-19 18:52:43 +0000 |
commit | 7c587bf53d67ef0e279e471ac6d52d5087f4b3e8 (patch) | |
tree | 47441dac0ca51451071740cc30d3507b84edea71 /Lib/test/script_helper.py | |
parent | 35b76027f94b12911cc97f960ebbb3c137d10d2b (diff) | |
download | cpython-git-7c587bf53d67ef0e279e471ac6d52d5087f4b3e8.tar.gz |
Issue #8438: Remove reference to the missing "surrogateescape" encoding
error handler from the new IO library.
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r-- | Lib/test/script_helper.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py index f29143057d..efb0523f32 100644 --- a/Lib/test/script_helper.py +++ b/Lib/test/script_helper.py @@ -19,11 +19,12 @@ def python_exit_code(*args): return subprocess.call(cmd_line, stdout=devnull, stderr=subprocess.STDOUT) -def spawn_python(*args): +def spawn_python(*args, **kwargs): cmd_line = [sys.executable, '-E'] cmd_line.extend(args) return subprocess.Popen(cmd_line, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + stdout=subprocess.PIPE, stderr=subprocess.STDOUT, + **kwargs) def kill_python(p): p.stdin.close() @@ -35,11 +36,11 @@ def kill_python(p): subprocess._cleanup() return data -def run_python(*args): +def run_python(*args, **kwargs): if __debug__: - p = spawn_python(*args) + p = spawn_python(*args, **kwargs) else: - p = spawn_python('-O', *args) + p = spawn_python('-O', *args, **kwargs) stdout_data = kill_python(p) return p.wait(), stdout_data |