summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-12-21 14:53:16 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-12-21 14:53:16 (GMT)
commitf0a49a9e27075478af9eb57ce45ecb10c6a6d383 (patch)
treec0aae59c552d7e365e8b70fee524908b7a2c73a8 /Lib
parentc90959947b1ec293622c1e92015e20540bc1e0c5 (diff)
parent28f8bee5c8faf0c275665786f90e260443739cdb (diff)
downloadcpython-f0a49a9e27075478af9eb57ce45ecb10c6a6d383.zip
cpython-f0a49a9e27075478af9eb57ce45ecb10c6a6d383.tar.gz
cpython-f0a49a9e27075478af9eb57ce45ecb10c6a6d383.tar.bz2
Issue #13645: fix test_import failure when run immediately after test_coding.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_import.py3
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")