Issue #19447: Suppress output of py_compile.compile().

This commit is contained in:
Berker Peksag 2014-09-01 12:30:17 +03:00
commit c85b7d3cd2
1 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ class PyCompileTests(unittest.TestCase):
def test_bad_coding(self): def test_bad_coding(self):
bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py') bad_coding = os.path.join(os.path.dirname(__file__), 'bad_coding2.py')
with support.captured_stderr():
self.assertIsNone(py_compile.compile(bad_coding, doraise=False)) self.assertIsNone(py_compile.compile(bad_coding, doraise=False))
self.assertFalse(os.path.exists( self.assertFalse(os.path.exists(
importlib.util.cache_from_source(bad_coding))) importlib.util.cache_from_source(bad_coding)))