mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Use new form of with-statement instead of contextlib.nested().
This commit is contained in:
parent
a678d94d58
commit
686057b8fa
4 changed files with 11 additions and 12 deletions
|
@ -174,7 +174,9 @@ class OtherNetworkTests(unittest.TestCase):
|
|||
(expected_err, url, req, type(err), err))
|
||||
self.assert_(isinstance(err, expected_err), msg)
|
||||
else:
|
||||
with support.transient_internet():
|
||||
with support.time_out, \
|
||||
support.socket_peer_reset, \
|
||||
support.ioerror_peer_reset:
|
||||
buf = f.read()
|
||||
f.close()
|
||||
debug("read %d bytes" % len(buf))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue