diff options
author | Georg Brandl <georg@python.org> | 2010-10-14 07:24:28 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-10-14 07:24:28 (GMT) |
commit | fb3c84a8d9974a49c0008a1832a9c9a3d001c4b4 (patch) | |
tree | 194375d4643421467b40a2ba8855622a42819b97 /Lib | |
parent | ebbf63b5b26cac8e62a4936e6434d234983b73b7 (diff) | |
download | cpython-fb3c84a8d9974a49c0008a1832a9c9a3d001c4b4.zip cpython-fb3c84a8d9974a49c0008a1832a9c9a3d001c4b4.tar.gz cpython-fb3c84a8d9974a49c0008a1832a9c9a3d001c4b4.tar.bz2 |
#9964: fix running test_import under -O or -OO.
Diffstat (limited to 'Lib')
-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") |