mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #1027206: getnameinfo is now restricted to numeric addresses as input.
This commit is contained in:
parent
219d1c8ae3
commit
112c0f3411
3 changed files with 7 additions and 1 deletions
|
@ -637,6 +637,10 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
flags=socket.AI_PASSIVE)
|
||||
self.assertEqual(a, b)
|
||||
|
||||
def test_getnameinfo(self):
|
||||
# only IP addresses are allowed
|
||||
self.assertRaises(socket.error, socket.getnameinfo, ('mail.python.org',0), 0)
|
||||
|
||||
def test_idna(self):
|
||||
# these should all be successful
|
||||
socket.gethostbyname('испытание.python.org')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue