diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2013-05-24 11:47:37 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2013-05-24 11:47:37 (GMT) |
commit | 27a4ac535f112b87d91f433eb9edcd0ae9988354 (patch) | |
tree | 6a2ae9b31323e7134f237af7e2209bc880d74fec /Lib | |
parent | 05ec6aca3a73772f16128628e8c3786b3e0cc4e6 (diff) | |
download | cpython-27a4ac535f112b87d91f433eb9edcd0ae9988354.zip cpython-27a4ac535f112b87d91f433eb9edcd0ae9988354.tar.gz cpython-27a4ac535f112b87d91f433eb9edcd0ae9988354.tar.bz2 |
Issue #17269: Workaround for a platform bug in getaddrinfo on OSX
Without this patch socket.getaddrinfo crashed when called
with some unusual argument combinations.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_socket.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index d20e37b..546a10d 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -1166,6 +1166,9 @@ class GeneralModuleTests(unittest.TestCase): # Issue #6697. self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800') + # Issue 17269 + socket.getaddrinfo("localhost", None, 0, 0, 0, socket.AI_NUMERICSERV) + def test_getnameinfo(self): # only IP addresses are allowed self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0) |