Raise ResourceDenied in test_urllib2net when the Net connection goes bad.

This commit is contained in:
Brett Cannon 2007-03-14 21:44:15 +00:00
parent ed001842cf
commit ea2835a860
2 changed files with 4 additions and 2 deletions

View file

@ -264,7 +264,8 @@ class OtherNetworkTests(unittest.TestCase):
(expected_err, url, req, err))
self.assert_(isinstance(err, expected_err), msg)
else:
buf = f.read()
with test_support.transient_internet():
buf = f.read()
f.close()
debug("read %d bytes" % len(buf))
debug("******** next url coming up...")

View file

@ -624,7 +624,8 @@ Extension Modules
Tests
-----
- Capture and silence socket connection resets and timeouts in test_socket_ssl.
- Capture socket connection resets and timeouts in test_socket_ssl and
test_urllib2net and raise test.test_support.ResourceDenied.
- Patch #1559413: Fix test_cmd_line if sys.executable contains a space.