diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-21 15:01:53 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-12-21 15:01:53 (GMT) |
commit | 17c07134a9619d110ad53f7a202612bfc304864e (patch) | |
tree | 175aa6d40b62add26a1259b9f636a3ba0f4669d9 | |
parent | b8572a1673a8bf25adf3b054f76315bdac2ea45e (diff) | |
download | cpython-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.py | 5 |
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' |