summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-10-14 04:16:54 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-10-14 04:16:54 (GMT)
commit1dbf2434d57566f831122b781d90c67536552548 (patch)
tree24ed003ae12cb0d189d2003b209f526c7e650e7f /Lib/test/test_subprocess.py
parentf7c8d9320beeadaec7114186d6b3ceeae8a80c1c (diff)
downloadcpython-1dbf2434d57566f831122b781d90c67536552548.zip
cpython-1dbf2434d57566f831122b781d90c67536552548.tar.gz
cpython-1dbf2434d57566f831122b781d90c67536552548.tar.bz2
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}).
Diffstat (limited to 'Lib/test/test_subprocess.py')
-rw-r--r--Lib/test/test_subprocess.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py
index 5875bc2..639a54d 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):