mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183)
This commit is contained in:
parent
8abd7c7e37
commit
3eca28c613
3 changed files with 92 additions and 1 deletions
|
@ -867,6 +867,8 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
def testCrucialConstants(self):
|
||||
# Testing for mission critical constants
|
||||
socket.AF_INET
|
||||
if socket.has_ipv6:
|
||||
socket.AF_INET6
|
||||
socket.SOCK_STREAM
|
||||
socket.SOCK_DGRAM
|
||||
socket.SOCK_RAW
|
||||
|
@ -875,6 +877,23 @@ class GeneralModuleTests(unittest.TestCase):
|
|||
socket.SOL_SOCKET
|
||||
socket.SO_REUSEADDR
|
||||
|
||||
def testCrucialIpProtoConstants(self):
|
||||
socket.IPPROTO_TCP
|
||||
socket.IPPROTO_UDP
|
||||
if socket.has_ipv6:
|
||||
socket.IPPROTO_IPV6
|
||||
|
||||
@unittest.skipUnless(os.name == "nt", "Windows specific")
|
||||
def testWindowsSpecificConstants(self):
|
||||
socket.IPPROTO_ICLFXBM
|
||||
socket.IPPROTO_ST
|
||||
socket.IPPROTO_CBT
|
||||
socket.IPPROTO_IGP
|
||||
socket.IPPROTO_RDP
|
||||
socket.IPPROTO_PGM
|
||||
socket.IPPROTO_L2TP
|
||||
socket.IPPROTO_SCTP
|
||||
|
||||
def testHostnameRes(self):
|
||||
# Testing hostname resolution mechanisms
|
||||
hostname = socket.gethostname()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue