Skip to content

Commit 17c0713

Browse files
committed
Fix test_import failure when run multiple times.
(2.7-only)
1 parent b8572a1 commit 17c0713

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_import.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,10 @@ def __del__(self):
263263
import imp
264264
sys.argv.insert(0, C())
265265
"""))
266-
script_helper.assert_python_ok(testfn)
266+
try:
267+
script_helper.assert_python_ok(testfn)
268+
finally:
269+
unlink(testfn)
267270

268271
def test_bug7732(self):
269272
source = TESTFN + '.py'

0 commit comments

Comments
 (0)