python38/python3-3.5.2-dont-raise-from-py_compile.patch

22 lines
862 B
Diff
Raw Normal View History

2019-12-19 12:27:39 +03:00
commit 2f819184eb7e28b6e5eb32aaee8e65c506499f29
Author: Philippe Makowski <pmakowski@espelida.com>
Date: Sun Jul 3 17:55:24 2016 +0200
dont-raise-from-py_compile
diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py
index 4a6caa5..bf67e36 100644
--- a/Lib/test/test_py_compile.py
+++ b/Lib/test/test_py_compile.py
@@ -69,6 +69,10 @@ class PyCompileTests(unittest.TestCase):
self.assertTrue(os.path.exists(self.pyc_path))
self.assertFalse(os.path.exists(self.cache_path))
+ 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))
+
def test_relative_path(self):
py_compile.compile(os.path.relpath(self.source_path),
os.path.relpath(self.pyc_path))