[Python-checkins] cpython (3.2): test_httplib removes temporary files

victor.stinner python-checkins at python.org
Wed Sep 21 01:09:55 CEST 2011


http://hg.python.org/cpython/rev/950515bff239
changeset: 72426:950515bff239
branch: 3.2
parent: 72423:7a48e98915f2
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Wed Sep 21 01:09:04 2011 +0200
summary:
 test_httplib removes temporary files
files:
 Lib/test/test_httplib.py | 2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_httplib.py b/Lib/test/test_httplib.py
--- a/Lib/test/test_httplib.py
+++ b/Lib/test/test_httplib.py
@@ -588,6 +588,7 @@
 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 @@
 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:
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /