diff Lib/test/test_socket.py @ 80962:39803c20c9bf 2.7

#8853: Allow port to be of type long for socket.getaddrinfo()
author Petri Lehtinen <petri@digip.org>
date Thu, 20 Dec 2012 21:06:14 +0200
parents 8599036d9140
children 5be3fa83d436
line wrap: on
line diff
--- a/Lib/test/test_socket.py	Thu Dec 20 12:55:52 2012 -0600
+++ b/Lib/test/test_socket.py	Thu Dec 20 21:06:14 2012 +0200
@@ -644,9 +644,10 @@
         if SUPPORTS_IPV6:
             socket.getaddrinfo('::1', 80)
         # port can be a string service name such as "http", a numeric
-        # port number or None
+        # port number (int or long), or None
         socket.getaddrinfo(HOST, "http")
         socket.getaddrinfo(HOST, 80)
+        socket.getaddrinfo(HOST, 80L)
         socket.getaddrinfo(HOST, None)
         # test family and socktype filters
         infos = socket.getaddrinfo(HOST, None, socket.AF_INET)