summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2012-07-08 10:08:45 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2012-07-08 10:08:45 (GMT)
commit3f4ce635ee70a4dbf2179ac2815bce4dac714165 (patch)
treec73a602354457b6bb70febc0b99adefb6a286dbd /Lib/test/test_builtin.py
parentbc07a5c9136c316383550ef38299792ab07eb167 (diff)
downloadcpython-3f4ce635ee70a4dbf2179ac2815bce4dac714165.zip
cpython-3f4ce635ee70a4dbf2179ac2815bce4dac714165.tar.gz
cpython-3f4ce635ee70a4dbf2179ac2815bce4dac714165.tar.bz2
Issue #11022 and #15287: correctly remove the TESTFN file in test_builtin.
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index d0d17c7..c32992c 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -960,7 +960,7 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(fp.read(1000), 'YYY'*100)
finally:
fp.close()
- unlink(TESTFN)
+ unlink(TESTFN)
def test_open_default_encoding(self):
old_environ = dict(os.environ)
@@ -979,6 +979,7 @@ class BuiltinTest(unittest.TestCase):
self.assertEqual(fp.encoding, current_locale_encoding)
finally:
fp.close()
+ unlink(TESTFN)
finally:
os.environ.clear()
os.environ.update(old_environ)