Commit fb3c84a8 authored by Georg Brandl's avatar Georg Brandl

#9964: fix running test_import under -O or -OO.

parent ebbf63b5
...@@ -520,7 +520,8 @@ class PycacheTests(unittest.TestCase): ...@@ -520,7 +520,8 @@ class PycacheTests(unittest.TestCase):
__import__(TESTFN) __import__(TESTFN)
self.assertTrue(os.path.exists('__pycache__')) self.assertTrue(os.path.exists('__pycache__'))
self.assertTrue(os.path.exists(os.path.join( 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', @unittest.skipUnless(os.name == 'posix',
"test meaningful only on posix systems") "test meaningful only on posix systems")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment