mirror of
https://github.com/python/cpython
synced 2024-09-22 07:31:36 +00:00
test_httplib removes temporary files
This commit is contained in:
parent
916048d780
commit
18d15cb665
|
@ -588,6 +588,7 @@ def test_bytes_body(self):
|
|||
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 @@ def test_file_body(self):
|
|||
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:
|
||||
|
|
Loading…
Reference in a new issue