aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorMax Bachmann <kontakt@maxbachmann.de>2025-03-18 11:26:51 +0100
committerGitHub <noreply@github.com>2025-03-18 11:26:51 +0100
commit3453b5c1d652a0424a333332b576f9b878424061 (patch)
tree194fc993404f72147a3a05b42b432545c84e8467 /Lib/test/test_socket.py
parentb0a4f6599a7d36cc08fe63d6f7d5d4dea64579f3 (diff)
downloadcpython-3453b5c1d652a0424a333332b576f9b878424061.tar.gz
cpython-3453b5c1d652a0424a333332b576f9b878424061.zip
gh-114917: add support for AI_NUMERICSERV in getaddrinfo emulation (#114918)
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index fc6e8593ae3..6572032c1d1 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1662,8 +1662,11 @@ class GeneralModuleTests(unittest.TestCase):
# Issue #6697.
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
- # Issue 17269: test workaround for OS X platform bug segfault
if hasattr(socket, 'AI_NUMERICSERV'):
+ self.assertRaises(socket.gaierror, socket.getaddrinfo, "localhost", "http",
+ flags=socket.AI_NUMERICSERV)
+
+ # Issue 17269: test workaround for OS X platform bug segfault
try:
# The arguments here are undefined and the call may succeed
# or fail. All we care here is that it doesn't segfault.