]> granicus.if.org Git - python/commitdiff
Better check for "any optimize option given".
authorGeorg Brandl <georg@python.org>
Thu, 14 Oct 2010 07:34:56 +0000 (07:34 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 14 Oct 2010 07:34:56 +0000 (07:34 +0000)
Lib/test/test_import.py

index 617f255a5286b68ff6e33be48c98e8984284282d..359ef915d2dd5d43ea6b36e5b6ba376d25cae3e4 100644 (file)
@@ -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")