mirror of
https://github.com/python/cpython
synced 2024-10-05 17:35:01 +00:00
#9964: fix running test_import under -O or -OO.
This commit is contained in:
parent
ebbf63b5b2
commit
fb3c84a8d9
|
@ -520,7 +520,8 @@ def test_import_pyc_path(self):
|
|||
__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")
|
||||
|
|
Loading…
Reference in a new issue