diff options
author | Raymond Hettinger <python@rcn.com> | 2009-06-04 00:11:54 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-06-04 00:11:54 (GMT) |
commit | 686057b8facb474a4542a2236f6ca2de7aa04cb5 (patch) | |
tree | ea013d9fa7c2f2d483be38493fd27c4e6d4aa191 /Lib/test/test_urllib2net.py | |
parent | a678d94d589021363139182e1e8e2f58f319eed7 (diff) | |
download | cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.zip cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.tar.gz cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.tar.bz2 |
Use new form of with-statement instead of contextlib.nested().
Diffstat (limited to 'Lib/test/test_urllib2net.py')
-rw-r--r-- | Lib/test/test_urllib2net.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py index c2da147..dc2d99d 100644 --- a/Lib/test/test_urllib2net.py +++ b/Lib/test/test_urllib2net.py @@ -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)) |