summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-08 23:31:48 (GMT)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>2010-12-08 23:31:48 (GMT)
commite239d23e8cc66605f548585ad4489a8f12fc070d (patch)
treee165422c11006a4f3595742dd40a7a2095ef59ce /Lib/test/test_socket.py
parent1b2bd3b348d7bb861ae8c92853e5058766ebff80 (diff)
downloadcpython-e239d23e8cc66605f548585ad4489a8f12fc070d.zip
cpython-e239d23e8cc66605f548585ad4489a8f12fc070d.tar.gz
cpython-e239d23e8cc66605f548585ad4489a8f12fc070d.tar.bz2
Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for NULL
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 32084da..6bdb6c9 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -667,6 +667,8 @@ class GeneralModuleTests(unittest.TestCase):
type=socket.SOCK_STREAM, proto=0,
flags=socket.AI_PASSIVE)
self.assertEqual(a, b)
+ # Issue #6697.
+ self.assertRaises(UnicodeEncodeError, socket.getaddrinfo, 'localhost', '\uD800')
def test_getnameinfo(self):
# only IP addresses are allowed