summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-08 06:20:35 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-12-08 06:20:35 (GMT)
commit9fe6d86709b0e769602ff55a6e5a202c440b9d8a (patch)
treeec3d7b1b0cbbd15658459e397c6905964c192331 /Lib/test/test_socket.py
parent774f909489ca1395ba1e3f3a1f3d43495df6cdfe (diff)
downloadcpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.zip
cpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.tar.gz
cpython-9fe6d86709b0e769602ff55a6e5a202c440b9d8a.tar.bz2
Issue 19572: More silently skipped tests explicitly skipped.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 12517ae..fc04aba 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -714,13 +714,13 @@ class GeneralModuleTests(unittest.TestCase):
ip = socket.gethostbyname(hostname)
except socket.error:
# Probably name lookup wasn't set up right; skip this test
- return
+ self.skipTest('name lookup failure')
self.assertTrue(ip.find('.') >= 0, "Error resolving host to ip.")
try:
hname, aliases, ipaddrs = socket.gethostbyaddr(ip)
except socket.error:
# Probably a similar problem as above; skip this test
- return
+ self.skipTest('name lookup failure')
all_host_names = [hostname, hname] + aliases
fqhn = socket.getfqdn(ip)
if not fqhn in all_host_names:
@@ -932,9 +932,9 @@ class GeneralModuleTests(unittest.TestCase):
try:
from socket import inet_pton, AF_INET6, has_ipv6
if not has_ipv6:
- return
+ self.skipTest('IPv6 not available')
except ImportError:
- return
+ self.skipTest('could not import needed symbols from socket')
f = lambda a: inet_pton(AF_INET6, a)
assertInvalid = lambda a: self.assertRaises(
(socket.error, ValueError), f, a
@@ -1010,9 +1010,9 @@ class GeneralModuleTests(unittest.TestCase):
try:
from socket import inet_ntop, AF_INET6, has_ipv6
if not has_ipv6:
- return
+ self.skipTest('IPv6 not available')
except ImportError:
- return
+ self.skipTest('could not import needed symbols from socket')
f = lambda a: inet_ntop(AF_INET6, a)
assertInvalid = lambda a: self.assertRaises(
(socket.error, ValueError), f, a
@@ -1045,7 +1045,7 @@ class GeneralModuleTests(unittest.TestCase):
my_ip_addr = socket.gethostbyname(socket.gethostname())
except socket.error:
# Probably name lookup wasn't set up right; skip this test
- return
+ self.skipTest('name lookup failure')
self.assertIn(name[0], ("0.0.0.0", my_ip_addr), '%s invalid' % name[0])
self.assertEqual(name[1], port)