summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socket.py
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2019-03-28 14:20:30 (GMT)
committerGitHub <noreply@github.com>2019-03-28 14:20:30 (GMT)
commit3eca28c61363a03b81b9fb12775490d6e42d8ecf (patch)
treec1f4488531517a141f47bb5bc688494bee69b61e /Lib/test/test_socket.py
parent8abd7c7e37714ce0c42f871f81e52f14c155d1bd (diff)
downloadcpython-3eca28c61363a03b81b9fb12775490d6e42d8ecf.zip
cpython-3eca28c61363a03b81b9fb12775490d6e42d8ecf.tar.gz
cpython-3eca28c61363a03b81b9fb12775490d6e42d8ecf.tar.bz2
bpo-29515: add missing socket.IPPROTO_* constants on Windows (GH-12183)
Diffstat (limited to 'Lib/test/test_socket.py')
-rw-r--r--Lib/test/test_socket.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index 08c7cde..8a990ea 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -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()