From: Victor Stinner Date: Tue, 20 Sep 2011 23:09:04 +0000 (+0200) Subject: test_httplib removes temporary files X-Git-Tag: v3.2.3rc1~559 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18d15cb665f8e446b79a0043eac7eee0904b4d10;p=thirdparty%2FPython%2Fcpython.git test_httplib removes temporary files --- diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py index ce9e34638acb..4899ac7284be 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: