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 d8f2d51..6eac67e 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -213,7 +213,8 @@ class ImportTest(unittest.TestCase): os.remove(source) del sys.modules[TESTFN] mod = __import__(TESTFN) - self.failUnless(mod.__file__.endswith('.pyc')) + ext = mod.__file__[-4:] + self.failUnless(ext in ('.pyc', '.pyo'), ext) finally: sys.path.pop(0) remove_files(TESTFN) |