summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-20 23:09:04 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-20 23:09:04 (GMT)
commit18d15cb665f8e446b79a0043eac7eee0904b4d10 (patch)
treef09baad4ca1237ae291c33b1afe3c5bb77c2d6fb
parent916048d7807b179cbf839346768516bfdaeadecf (diff)
downloadcpython-18d15cb665f8e446b79a0043eac7eee0904b4d10.zip
cpython-18d15cb665f8e446b79a0043eac7eee0904b4d10.tar.gz
cpython-18d15cb665f8e446b79a0043eac7eee0904b4d10.tar.bz2
test_httplib removes temporary files
-rw-r--r--Lib/test/test_httplib.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
index ce9e346..4899ac7 100644
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -588,6 +588,7 @@ class RequestBodyTest(TestCase):
self.assertEqual(b'body\xc1', f.read())
def test_file_body(self):
+ self.addCleanup(support.unlink, support.TESTFN)
with open(support.TESTFN, "w") as f:
f.write("body")
with open(support.TESTFN) as f:
@@ -599,6 +600,7 @@ class RequestBodyTest(TestCase):
self.assertEqual(b'body', f.read())
def test_binary_file_body(self):
+ self.addCleanup(support.unlink, support.TESTFN)
with open(support.TESTFN, "wb") as f:
f.write(b"body\xc1")
with open(support.TESTFN, "rb") as f: