mirror of
https://github.com/python/cpython.git
synced 2025-08-29 21:25:01 +00:00
Skip socket tests that require the network, if the network resource is not enabled
This commit is contained in:
parent
4c7c421944
commit
460ff3dd1c
1 changed files with 2 additions and 0 deletions
|
@ -642,6 +642,8 @@ class GeneralModuleTests(unittest.TestCase):
|
||||||
# only IP addresses are allowed
|
# only IP addresses are allowed
|
||||||
self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)
|
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):
|
def test_idna(self):
|
||||||
support.requires('network')
|
support.requires('network')
|
||||||
# these should all be successful
|
# these should all be successful
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue