Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67e91ad

Browse files
committed
Explicitly pass socket type and family for getaddrinfo,
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.
1 parent ee6d647 commit 67e91ad

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Lib/test/test_socket.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,8 +641,10 @@ def test_idna(self):
641641
# these should all be successful
642642
socket.gethostbyname('испытание.python.org')
643643
socket.gethostbyname_ex('испытание.python.org')
644-
socket.getaddrinfo('испытание.python.org',0)
645-
socket.gethostbyaddr('испытание.python.org')
644+
socket.getaddrinfo('испытание.python.org',0,socket.AF_UNSPEC,socket.SOCK_STREAM)
645+
# this may not work if the forward lookup choses the IPv6 address, as that doesn't
646+
# have a reverse entry yet
647+
# socket.gethostbyaddr('испытание.python.org')
646648

647649
@unittest.skipUnless(thread, 'Threading required for this test.')
648650
class BasicTCPTest(SocketConnectedTest):

0 commit comments

Comments
 (0)