[issue8857] socket.getaddrinfo needs tests

Ronald Oussoren report at bugs.python.org
Sun Aug 15 21:47:18 CEST 2010


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

I think there is a missing '0' in the failing line:

Index: Lib/test/test_socket.py
===================================================================
--- Lib/test/test_socket.py	(revision 84079)
+++ Lib/test/test_socket.py	(working copy)
@@ -608,7 +608,7 @@
         for _, socktype, _, _, _ in infos:
             self.assertEqual(socktype, socket.SOCK_STREAM)
         # test proto and flags arguments
-        socket.getaddrinfo(HOST, None, 0, 0, socket.AI_CANONNAME)
+        socket.getaddrinfo(HOST, None, 0, 0, 0, socket.AI_CANONNAME)
         socket.getaddrinfo(HOST, None, 0, 0, 0, socket.AI_PASSIVE)
         # a server willing to support both IPv4 and IPv6 will
         # usually do this



With this patch the tests pass, without the patch AI_CANNAME gets used as the value for 'proto'.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8857>
_______________________________________


More information about the Python-bugs-list mailing list