From 80512de43b83168bb920504f4d809fa70b17548b Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 25 Jan 2013 22:27:21 -0500 Subject: [PATCH] Skip a test unless the network resource is available. --- Lib/test/test_urllib2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py index 22e553fa77f..4fc8c4307e6 100644 --- a/Lib/test/test_urllib2.py +++ b/Lib/test/test_urllib2.py @@ -1445,6 +1445,8 @@ class MiscTests(unittest.TestCase): self.opener_has_handler(o, MyHTTPHandler) self.opener_has_handler(o, MyOtherHTTPHandler) + @unittest.skipUnless(support.is_resource_enabled('network'), + 'test requires network access') def test_issue16464(self): opener = urllib.request.build_opener() request = urllib.request.Request("http://www.python.org/~jeremy/")