From 9d2a01fb2b4fa9af408973cbee68a16467ede18b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Mon, 13 Apr 2015 16:28:11 -0400 Subject: Issue #23822: Fix test_py_compile to not fail under -O. --- Lib/test/test_py_compile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index bff35db..03cca5d 100644 --- a/Lib/test/test_py_compile.py +++ b/Lib/test/test_py_compile.py @@ -100,6 +100,7 @@ class PyCompileTests(unittest.TestCase): self.assertFalse(os.path.exists( importlib.util.cache_from_source(bad_coding))) + @unittest.skipIf(sys.flags.optimize > 0, 'test does not work with -O') def test_double_dot_no_clobber(self): # http://bugs.python.org/issue22966 # py_compile foo.bar.py -> __pycache__/foo.cpython-34.pyc -- cgit v0.12