Raise ResourceDenied in test_urllib2net when the Net connection goes bad.
diff --git a/Lib/test/test_urllib2net.py b/Lib/test/test_urllib2net.py
index b271626..888a738 100644
--- a/Lib/test/test_urllib2net.py
+++ b/Lib/test/test_urllib2net.py
@@ -264,7 +264,8 @@
(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...")
diff --git a/Misc/NEWS b/Misc/NEWS
index f778761..34b7086 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -624,7 +624,8 @@
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.