From: Georg Brandl Date: Thu, 14 Oct 2010 07:34:56 +0000 (+0000) Subject: Better check for "any optimize option given". X-Git-Tag: v3.2a4~603 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c2a7b7a698144b8dc5a890a76236e85f0bf763e;p=thirdparty%2FPython%2Fcpython.git Better check for "any optimize option given". --- diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 617f255a5286..359ef915d2dd 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -521,7 +521,7 @@ class PycacheTests(unittest.TestCase): self.assertTrue(os.path.exists('__pycache__')) self.assertTrue(os.path.exists(os.path.join( '__pycache__', '{}.{}.py{}'.format( - TESTFN, self.tag, sys.flags.optimize and 'o' or 'c')))) + TESTFN, self.tag, __debug__ and 'c' or 'o')))) @unittest.skipUnless(os.name == 'posix', "test meaningful only on posix systems")