diff options
author | Charles-François Natali <neologix@free.fr> | 2012-01-02 14:57:30 (GMT) |
---|---|---|
committer | Charles-François Natali <neologix@free.fr> | 2012-01-02 14:57:30 (GMT) |
commit | 42663334cd9ef3348732e6a229478e67730b4ecb (patch) | |
tree | e7ccf6f027aca5591d2eab2a9fdde92bd1be2a38 /Lib/test/test_socket.py | |
parent | dc9dd0d3401243144384f7a5e54c731edaaf9d7e (diff) | |
parent | 366999a0119e860d1e3137ef6bb56b3b913840f4 (diff) | |
download | cpython-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.py | 7 |
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): |