]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_httplib removes temporary files
authorVictor Stinner <victor.stinner@haypocalc.com>
Tue, 20 Sep 2011 23:09:04 +0000 (01:09 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Tue, 20 Sep 2011 23:09:04 +0000 (01:09 +0200)
Lib/test/test_httplib.py

index ce9e34638acbbc89218fe99e916e4f3c174ea5ee..4899ac7284be00a869454cf103cee6dfe99811bc 100644 (file)
@@ -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: