File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -947,6 +947,37 @@ def testWindowsSpecificConstants(self):
947947 socket .IPPROTO_L2TP
948948 socket .IPPROTO_SCTP
949949
950+ @unittest .skipUnless (sys .platform == 'darwin' , 'macOS specific test' )
951+ @unittest .skipUnless (support .IPV6_ENABLED , 'IPv6 required for this test' )
952+ def test3542SocketOptions (self ):
953+ # Ref. issue #35569 and https://tools.ietf.org/html/rfc3542
954+ opts = {
955+ 'IPV6_CHECKSUM' ,
956+ 'IPV6_DONTFRAG' ,
957+ 'IPV6_DSTOPTS' ,
958+ 'IPV6_HOPLIMIT' ,
959+ 'IPV6_HOPOPTS' ,
960+ 'IPV6_NEXTHOP' ,
961+ 'IPV6_PATHMTU' ,
962+ 'IPV6_PKTINFO' ,
963+ 'IPV6_RECVDSTOPTS' ,
964+ 'IPV6_RECVHOPLIMIT' ,
965+ 'IPV6_RECVHOPOPTS' ,
966+ 'IPV6_RECVPATHMTU' ,
967+ 'IPV6_RECVPKTINFO' ,
968+ 'IPV6_RECVRTHDR' ,
969+ 'IPV6_RECVTCLASS' ,
970+ 'IPV6_RTHDR' ,
971+ 'IPV6_RTHDRDSTOPTS' ,
972+ 'IPV6_RTHDR_TYPE_0' ,
973+ 'IPV6_TCLASS' ,
974+ 'IPV6_USE_MIN_MTU' ,
975+ }
976+ for opt in opts :
977+ self .assertTrue (
978+ hasattr (socket , opt ), f"Missing RFC3542 socket option '{ opt } '"
979+ )
980+
950981 def testHostnameRes (self ):
951982 # Testing hostname resolution mechanisms
952983 hostname = socket .gethostname ()
You can’t perform that action at this time.
0 commit comments