]> granicus.if.org Git - python/commitdiff
Skip socket tests that require the network, if the network resource is not enabled
authorDaniel Stutzbach <daniel@stutzbachenterprises.com>
Thu, 9 Sep 2010 21:17:58 +0000 (21:17 +0000)
committerDaniel Stutzbach <daniel@stutzbachenterprises.com>
Thu, 9 Sep 2010 21:17:58 +0000 (21:17 +0000)
Lib/test/test_socket.py

index 81f9cdf7f213afbb9fc358a40d719584ab679935..05b6ca784922637a2c4734854f213104d72ab9b0 100644 (file)
@@ -642,6 +642,8 @@ class GeneralModuleTests(unittest.TestCase):
         # only IP addresses are allowed
         self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)
 
+    @unittest.skipUnless(support.is_resource_enabled('network'),
+                         'network is not enabled')
     def test_idna(self):
         support.requires('network')
         # these should all be successful