diff Lib/test/test_subprocess.py @ 63727:5931112eabe7

Factor out stripping of interpreter debug output in test.support.strip_python_stderr()
author Antoine Pitrou <solipsis@pitrou.net>
date Wed, 04 Aug 2010 11:48:56 +0000
parents 2ad8e8ce46c6
children ad292fce79f9
line wrap: on
line diff
--- a/Lib/test/test_subprocess.py	Wed Aug 04 10:36:18 2010 +0000
+++ b/Lib/test/test_subprocess.py	Wed Aug 04 11:48:56 2010 +0000
@@ -53,7 +53,7 @@
         # In a debug build, stuff like "[6580 refs]" is printed to stderr at
         # shutdown time.  That frustrates tests trying to check stderr produced
         # from a spawned Python process.
-        actual = re.sub("\[\d+ refs\]\r?\n?$", "", stderr.decode()).encode()
+        actual = support.strip_python_stderr(stderr)
         self.assertEqual(actual, expected, msg)