[Python-checkins] cpython: Skip a test unless the network resource is available.

brett.cannon python-checkins at python.org
Sat Jan 26 14:50:05 CET 2013


http://hg.python.org/cpython/rev/7aebb882a0c8
changeset:   81760:7aebb882a0c8
parent:      81742:d8c2ce63f5a4
user:        Brett Cannon <brett at python.org>
date:        Fri Jan 25 22:27:21 2013 -0500
summary:
  Skip a test unless the network resource is available.

files:
  Lib/test/test_urllib2.py |  2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -1445,6 +1445,8 @@
         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/")

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list