]> granicus.if.org Git - python/commitdiff
use modern conditional syntax
authorBenjamin Peterson <benjamin@python.org>
Tue, 25 Sep 2012 15:01:41 +0000 (11:01 -0400)
committerBenjamin Peterson <benjamin@python.org>
Tue, 25 Sep 2012 15:01:41 +0000 (11:01 -0400)
Lib/test/test_import.py

index cfed14284588aa3afd1ea454a7d0870e50990a79..0f8f1f584f564361848d41fcdcacb2366a2855fa 100644 (file)
@@ -575,7 +575,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, __debug__ and 'c' or 'o'))))
+            TESTFN, self.tag, 'c' if __debug__ else 'o'))))
 
     @unittest.skipUnless(os.name == 'posix',
                          "test meaningful only on posix systems")