summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2014-09-01 09:29:53 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2014-09-01 09:29:53 (GMT)
commita7614d08bf173ef6f6f37d3bc825fc6006ddebb8 (patch)
tree3dced686e3da14207cea0d55722225f8d593497e
parent29020b155a218689c4efe83977fad9d3803974cc (diff)
downloadcpython-a7614d08bf173ef6f6f37d3bc825fc6006ddebb8.zip
cpython-a7614d08bf173ef6f6f37d3bc825fc6006ddebb8.tar.gz
cpython-a7614d08bf173ef6f6f37d3bc825fc6006ddebb8.tar.bz2
Issue #19447: Suppress output of py_compile.compile().
-rw-r--r--Lib/test/test_py_compile.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 640dcc3..0a7e2f8 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -94,7 +94,8 @@ class PyCompileTests(unittest.TestCase):
def test_bad_coding(self):
bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py')
- self.assertIsNone(py_compile.compile(bad_coding, doraise=False))
+ with support.captured_stderr():
+ self.assertIsNone(py_compile.compile(bad_coding, doraise=False))
self.assertFalse(os.path.exists(
importlib.util.cache_from_source(bad_coding)))