[Python-checkins] r87136 - python/branches/py3k/Lib/test/script_helper.py

r.david.murray python-checkins at python.org
Wed Dec 8 23:53:00 CET 2010


Author: r.david.murray
Date: Wed Dec  8 23:53:00 2010
New Revision: 87136

Log:
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.


Modified:
   python/branches/py3k/Lib/test/script_helper.py

Modified: python/branches/py3k/Lib/test/script_helper.py
==============================================================================
--- python/branches/py3k/Lib/test/script_helper.py	(original)
+++ python/branches/py3k/Lib/test/script_helper.py	Wed Dec  8 23:53:00 2010
@@ -3,6 +3,7 @@
 
 import sys
 import os
+import re
 import os.path
 import tempfile
 import subprocess
@@ -12,7 +13,7 @@
 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 @@
         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, "


More information about the Python-checkins mailing list