Skip to content

Commit 1041701

Browse files
authored
add test for socket.AI_NUMERICSERV
1 parent d97125e commit 1041701

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_socket.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1662,8 +1662,11 @@ def testGetaddrinfo(self):
16621662
# Issue #6697.
16631663
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
16641664

1665-
# Issue 17269: test workaround for OS X platform bug segfault
16661665
if hasattr(socket, 'AI_NUMERICSERV'):
1666+
self.assertRaises(socket.gaierror, socket.getaddrinfo, "localhost", "http",
1667+
flags=socket.AI_NUMERICSERV)
1668+
1669+
# Issue 17269: test workaround for OS X platform bug segfault
16671670
try:
16681671
# The arguments here are undefined and the call may succeed
16691672
# or fail. All we care here is that it doesn't segfault.

0 commit comments

Comments
 (0)