From: Tim Peters Date: Thu, 14 Oct 2004 04:16:54 +0000 (+0000) Subject: remove_stderr_debug_decorations(): Always try the substitution. Else X-Git-Tag: v2.4b1~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1dbf2434d57566f831122b781d90c67536552548;p=python remove_stderr_debug_decorations(): Always try the substitution. Else 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}). --- diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 5875bc2e11..639a54d9b5 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -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):