summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-12-21 15:01:53 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-12-21 15:01:53 (GMT)
commit17c07134a9619d110ad53f7a202612bfc304864e (patch)
tree175aa6d40b62add26a1259b9f636a3ba0f4669d9
parentb8572a1673a8bf25adf3b054f76315bdac2ea45e (diff)
downloadcpython-17c07134a9619d110ad53f7a202612bfc304864e.zip
cpython-17c07134a9619d110ad53f7a202612bfc304864e.tar.gz
cpython-17c07134a9619d110ad53f7a202612bfc304864e.tar.bz2
Fix test_import failure when run multiple times.
(2.7-only)
-rw-r--r--Lib/test/test_import.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py
index fc3d001..bdf9443 100644
--- a/Lib/test/test_import.py
+++ b/Lib/test/test_import.py
@@ -263,7 +263,10 @@ class ImportTests(unittest.TestCase):
import imp
sys.argv.insert(0, C())
"""))
- script_helper.assert_python_ok(testfn)
+ try:
+ script_helper.assert_python_ok(testfn)
+ finally:
+ unlink(testfn)
def test_bug7732(self):
source = TESTFN + '.py'