Issue #1027206: Support IDNA in gethostbyname, gethostbyname_ex and

getaddrinfo. Patch by David Watson.
This commit is contained in:
Martin v. Löwis 2010-08-22 19:33:47 +00:00
parent d41a37a148
commit fc0275a14a
3 changed files with 25 additions and 10 deletions

View file

@ -637,6 +637,11 @@ class GeneralModuleTests(unittest.TestCase):
flags=socket.AI_PASSIVE)
self.assertEqual(a, b)
def test_idna(self):
# these should all be successful
socket.gethostbyname('испытание.python.org')
socket.gethostbyname_ex('испытание.python.org')
socket.getaddrinfo('испытание.python.org',0)
@unittest.skipUnless(thread, 'Threading required for this test.')
class BasicTCPTest(SocketConnectedTest):