From: Daniel Stutzbach Date: Thu, 9 Sep 2010 21:17:58 +0000 (+0000) Subject: Skip socket tests that require the network, if the network resource is not enabled X-Git-Tag: v3.2a3~354 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=460ff3dd1c27b565fd5dd02edf43f97892cc7b79;p=thirdparty%2FPython%2Fcpython.git Skip socket tests that require the network, if the network resource is not enabled --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 81f9cdf7f213..05b6ca784922 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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