(original) (raw)

changeset: 74113:a6bd166abde5 parent: 74111:bd3631f9aa5c parent: 74112:f4afc6858ed2 user: Antoine Pitrou solipsis@pitrou.net date: Wed Dec 21 15:53:16 2011 +0100 files: Lib/test/test_import.py description: Issue #13645: fix test_import failure when run immediately after test_coding. diff -r bd3631f9aa5c -r a6bd166abde5 Lib/test/test_import.py --- a/Lib/test/test_import.py Wed Dec 21 22:31:36 2011 +0800 +++ b/Lib/test/test_import.py Wed Dec 21 15:53:16 2011 +0100 @@ -104,8 +104,9 @@ try: fname = TESTFN + os.extsep + "py" create_empty_file(fname) + fn = imp.cache_from_source(fname) + unlink(fn) __import__(TESTFN) - fn = imp.cache_from_source(fname) if not os.path.exists(fn): self.fail("__import__ did not result in creation of " "either a .pyc or .pyo file") /solipsis@pitrou.net