summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2012-01-02 14:47:29 (GMT)
committerCharles-François Natali <neologix@free.fr>2012-01-02 14:47:29 (GMT)
commit366999a0119e860d1e3137ef6bb56b3b913840f4 (patch)
tree0b636e2df504724399b469823aaf5b4d07579c6a /Lib/test/test_socket.py
parent70efbefcc5c26e675c064f50dd2c64cc375f20ac (diff)
downloadcpython-366999a0119e860d1e3137ef6bb56b3b913840f4.zip
cpython-366999a0119e860d1e3137ef6bb56b3b913840f4.tar.gz
cpython-366999a0119e860d1e3137ef6bb56b3b913840f4.tar.bz2
Issue #9975: socket: Fix incorrect use of flowinfo and scope_id. Patch by
Vilmos Nebehaj.
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index d419301..d77b7dc 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -846,6 +846,13 @@ class GeneralModuleTests(unittest.TestCase):
srv.listen(0)
srv.close()
+ @unittest.skipUnless(SUPPORTS_IPV6, 'IPv6 required for this test.')
+ def test_flowinfo(self):
+ self.assertRaises(OverflowError, socket.getnameinfo,
+ ('::1',0, 0xffffffff), 0)
+ with socket.socket(socket.AF_INET6, socket.SOCK_STREAM) as s:
+ self.assertRaises(OverflowError, s.bind, ('::1', 0, -10))
+
@unittest.skipUnless(thread, 'Threading required for this test.')
class BasicTCPTest(SocketConnectedTest):