FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-35569: Expose RFC 3542 IPv6 socket options on macOS by erlend-aasland · Pull Request #19526 · python/cpython · GitHub

Repository navigation

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
Prev Previous commit
Next Next commit
bpo-35569: Add unit tests
  • Loading branch information
Erlend E. Aasland committed Apr 27, 2020
commit fe71bb755bae8a6134fad4c1d8734c7faf74cfb1
31 changes: 31 additions & 0 deletions Lib/test/test_socket.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,37 @@ def testWindowsSpecificConstants(self):
socket.IPPROTO_L2TP
socket.IPPROTO_SCTP

@unittest.skipUnless(sys.platform == 'darwin', 'macOS specific test')
@unittest.skipUnless(support.IPV6_ENABLED, 'IPv6 required for this test')
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
def test3542SocketOptions(self):
# Ref. issue #35569 and https://tools.ietf.org/html/rfc3542
opts = {
'IPV6_CHECKSUM',
'IPV6_DONTFRAG',
'IPV6_DSTOPTS',
'IPV6_HOPLIMIT',
'IPV6_HOPOPTS',
'IPV6_NEXTHOP',
'IPV6_PATHMTU',
'IPV6_PKTINFO',
'IPV6_RECVDSTOPTS',
'IPV6_RECVHOPLIMIT',
'IPV6_RECVHOPOPTS',
'IPV6_RECVPATHMTU',
'IPV6_RECVPKTINFO',
'IPV6_RECVRTHDR',
'IPV6_RECVTCLASS',
'IPV6_RTHDR',
'IPV6_RTHDRDSTOPTS',
'IPV6_RTHDR_TYPE_0',
'IPV6_TCLASS',
'IPV6_USE_MIN_MTU',
}
for opt in opts:
self.assertTrue(
hasattr(socket, opt), f"Missing RFC3542 socket option '{opt}'"
)

def testHostnameRes(self):
# Testing hostname resolution mechanisms
hostname = socket.gethostname()
Expand Down

Back | FazBrowse Home | New Git URL