summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorCharles-François Natali <neologix@free.fr>2012-01-02 14:57:30 (GMT)
committerCharles-François Natali <neologix@free.fr>2012-01-02 14:57:30 (GMT)
commit42663334cd9ef3348732e6a229478e67730b4ecb (patch)
treee7ccf6f027aca5591d2eab2a9fdde92bd1be2a38 /Lib/test/test_socket.py
parentdc9dd0d3401243144384f7a5e54c731edaaf9d7e (diff)
parent366999a0119e860d1e3137ef6bb56b3b913840f4 (diff)
downloadcpython-42663334cd9ef3348732e6a229478e67730b4ecb.zip
cpython-42663334cd9ef3348732e6a229478e67730b4ecb.tar.gz
cpython-42663334cd9ef3348732e6a229478e67730b4ecb.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 a7cee59..b5c16ca 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1248,6 +1248,13 @@ class GeneralModuleTests(unittest.TestCase):
srv.listen(0)
srv.close()
+ @unittest.skipUnless(support.IPV6_ENABLED, '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(HAVE_SOCKET_CAN, 'SocketCan required for this test.')
class BasicCANTest(unittest.TestCase):