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}).
This commit is contained in:
Tim Peters 2004-10-14 04:16:54 +00:00
parent f7c8d9320b
commit 1dbf2434d5
1 changed files with 1 additions and 3 deletions

View 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):