From 1dbf2434d57566f831122b781d90c67536552548 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Thu, 14 Oct 2004 04:16:54 +0000 Subject: [PATCH] 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}). --- Lib/test/test_subprocess.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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): -- 2.40.0