diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2010-08-25 07:38:15 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2010-08-25 07:38:15 (GMT) |
commit | 112c0f34119fb2fe127bf54393bf06f5c334836a (patch) | |
tree | a21cf53d8d41f693b91c59a370c189273504bc89 /Lib | |
parent | 219d1c8ae320bf1b016f4a4fc5dee50f729048be (diff) | |
download | cpython-112c0f34119fb2fe127bf54393bf06f5c334836a.zip cpython-112c0f34119fb2fe127bf54393bf06f5c334836a.tar.gz cpython-112c0f34119fb2fe127bf54393bf06f5c334836a.tar.bz2 |
Issue #1027206: getnameinfo is now restricted to numeric addresses as input.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_socket.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 60e5bf7..5a8aa5a 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -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') |