diff options
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 86ef40e..9f80b70 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -104,8 +104,9 @@ class ImportTests(unittest.TestCase): try: fname = TESTFN + os.extsep + "py" create_empty_file(fname) - __import__(TESTFN) fn = imp.cache_from_source(fname) + unlink(fn) + __import__(TESTFN) if not os.path.exists(fn): self.fail("__import__ did not result in creation of " "either a .pyc or .pyo file") |