summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2013-06-10 08:36:28 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2013-06-10 08:36:28 (GMT)
commita822d366750ea0817276f35fd3adcd894472a70a (patch)
treeb99012e0114acb7fcf5327e42cc36f87b1e21469 /Lib
parent6f50b810b78eaecff78bb7e2a3109d1cc672dbe0 (diff)
downloadcpython-a822d366750ea0817276f35fd3adcd894472a70a.zip
cpython-a822d366750ea0817276f35fd3adcd894472a70a.tar.gz
cpython-a822d366750ea0817276f35fd3adcd894472a70a.tar.bz2
Ensure that the fix for #17269 also works on OSX 10.4
AI_NUMERICSERV isn't defined on OSX 10.4.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_socket.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 546a10d..25bf0a1 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1167,7 +1167,8 @@ class GeneralModuleTests(unittest.TestCase):
self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
# Issue 17269
- socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
+ if hasattr(socket, 'AI_NUMERICSERV'):
+ socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV)
def test_getnameinfo(self):
# only IP addresses are allowed