summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2012-12-20 19:06:14 (GMT)
committerPetri Lehtinen <petri@digip.org>2012-12-20 19:09:56 (GMT)
commitab7dd183f3e5671b20b9d6dae0bf2c22d4c8396b (patch)
tree87017bd7f78427d93295093bc52030999366e267 /Lib
parent92014420d7a19c339a28e9e0115cd80417b3a843 (diff)
downloadcpython-ab7dd183f3e5671b20b9d6dae0bf2c22d4c8396b.zip
cpython-ab7dd183f3e5671b20b9d6dae0bf2c22d4c8396b.tar.gz
cpython-ab7dd183f3e5671b20b9d6dae0bf2c22d4c8396b.tar.bz2
#8853: Allow port to be of type long for socket.getaddrinfo()
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_socket.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 7d8b33a..053c6fe 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -644,9 +644,10 @@ class GeneralModuleTests(unittest.TestCase):
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)