mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
#8853: Allow port to be of type long for socket.getaddrinfo()
This commit is contained in:
parent
92014420d7
commit
ab7dd183f3
3 changed files with 11 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue