]> granicus.if.org Git - python/commitdiff
Explicitly pass socket type and family for getaddrinfo,
authorMartin v. Löwis <martin@v.loewis.de>
Mon, 23 Aug 2010 15:27:26 +0000 (15:27 +0000)
committerMartin v. Löwis <martin@v.loewis.de>
Mon, 23 Aug 2010 15:27:26 +0000 (15:27 +0000)
to make test work on Solaris.
Disable gethostbyaddr IDNA test for now as there is no
reverse DNS entry for the IPv6 address of the test name.

Lib/test/test_socket.py

index 1a85c0e7ce415094cf9a32829bc5a62b9df85da4..60e5bf7e2c414f5057424aec258372a101ba1d71 100644 (file)
@@ -641,8 +641,10 @@ class GeneralModuleTests(unittest.TestCase):
         # these should all be successful
         socket.gethostbyname('испытание.python.org')
         socket.gethostbyname_ex('испытание.python.org')
-        socket.getaddrinfo('испытание.python.org',0)
-        socket.gethostbyaddr('испытание.python.org')
+        socket.getaddrinfo('испытание.python.org',0,socket.AF_UNSPEC,socket.SOCK_STREAM)
+        # this may not work if the forward lookup choses the IPv6 address, as that doesn't
+        # have a reverse entry yet
+        # socket.gethostbyaddr('испытание.python.org')
 
 @unittest.skipUnless(thread, 'Threading required for this test.')
 class BasicTCPTest(SocketConnectedTest):