]> granicus.if.org Git - python/commitdiff
remove_stderr_debug_decorations(): Always try the substitution. Else
authorTim Peters <tim.peters@gmail.com>
Thu, 14 Oct 2004 04:16:54 +0000 (04:16 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 14 Oct 2004 04:16:54 +0000 (04:16 +0000)
this test failed under the combination of passing -O to a debug-build
Python.  Now all 4 of those pass ({debug, release} x {-O, no -O}).

Lib/test/test_subprocess.py

index 5875bc2e1105ec294cf3e962b7d6905e59a86c5b..639a54d9b510c683bb3e415ada5eb30e374db068 100644 (file)
@@ -24,9 +24,7 @@ else:
 # shutdown time.  That frustrates tests trying to check stderr produced
 # from a spawned Python process.
 def remove_stderr_debug_decorations(stderr):
-    if __debug__:
-        stderr = re.sub(r"\[\d+ refs\]\r?\n?$", "", stderr)
-    return stderr
+    return re.sub(r"\[\d+ refs\]\r?\n?$", "", stderr)
 
 class ProcessTestCase(unittest.TestCase):
     def mkstemp(self):