diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-12-08 22:53:00 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-12-08 22:53:00 (GMT) |
commit | 1b2bd3b348d7bb861ae8c92853e5058766ebff80 (patch) | |
tree | 00adf90a92566bfc7e14406422da847b331d4ea8 /Lib/test/script_helper.py | |
parent | 53a9dd776e62f6bc3b1884f3aa82e49a78bd83a8 (diff) | |
download | cpython-1b2bd3b348d7bb861ae8c92853e5058766ebff80.zip cpython-1b2bd3b348d7bb861ae8c92853e5058766ebff80.tar.gz cpython-1b2bd3b348d7bb861ae8c92853e5058766ebff80.tar.bz2 |
Have script_helper._assert_python strip refcount strings from stderr.
This makes the output of the function and those that depend on it
independent of whether or not they are being run under a debug
build.
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r-- | Lib/test/script_helper.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py index 14e113b..371c33d 100644 --- a/Lib/test/script_helper.py +++ b/Lib/test/script_helper.py @@ -3,6 +3,7 @@ import sys import os +import re import os.path import tempfile import subprocess @@ -12,7 +13,7 @@ import shutil import zipfile from imp import source_from_cache -from test.support import make_legacy_pyc +from test.support import make_legacy_pyc, strip_python_stderr # Executing the interpreter in a subprocess def _assert_python(expected_success, *args, **env_vars): @@ -34,6 +35,7 @@ def _assert_python(expected_success, *args, **env_vars): p.stdout.close() p.stderr.close() rc = p.returncode + err = strip_python_stderr(err) if (rc and expected_success) or (not rc and not expected_success): raise AssertionError( "Process return code is %d, " |