From: Brett Cannon Date: Mon, 13 Apr 2015 20:28:11 +0000 (-0400) Subject: Issue #23822: Fix test_py_compile to not fail under -O. X-Git-Tag: v3.5.0a4~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d2a01fb2b4fa9af408973cbee68a16467ede18b;p=thirdparty%2FPython%2Fcpython.git Issue #23822: Fix test_py_compile to not fail under -O. --- diff --git a/Lib/test/test_py_compile.py b/Lib/test/test_py_compile.py index bff35dbbcf7f..03cca5dcbf4a 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