diff options
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 1d6939b..617f255 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -520,7 +520,8 @@ class PycacheTests(unittest.TestCase): __import__(TESTFN) self.assertTrue(os.path.exists('__pycache__')) self.assertTrue(os.path.exists(os.path.join( - '__pycache__', '{}.{}.pyc'.format(TESTFN, self.tag)))) + '__pycache__', '{}.{}.py{}'.format( + TESTFN, self.tag, sys.flags.optimize and 'o' or 'c')))) @unittest.skipUnless(os.name == 'posix', "test meaningful only on posix systems") |