MCPcopy Index your code
hub / github.com/python/cpython / test_getaddrinfo_ipv6_basic

Method test_getaddrinfo_ipv6_basic

Lib/test/test_socket.py:1974–1981  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1972
1973 @unittest.skipUnless(socket_helper.IPV6_ENABLED, 'IPv6 required for this test.')
1974 def test_getaddrinfo_ipv6_basic(self):
1975 ((*_, sockaddr),) = socket.getaddrinfo(
1976 'ff02::1de:c0:face:8D', # Note capital letter `D`.
1977 1234, socket.AF_INET6,
1978 socket.SOCK_DGRAM,
1979 socket.IPPROTO_UDP
1980 )
1981 self.assertEqual(sockaddr, ('ff02::1de:c0:face:8d', 1234, 0, 0))
1982
1983 def test_getfqdn_filter_localhost(self):
1984 self.assertEqual(socket.getfqdn(), socket.getfqdn("0.0.0.0"))

Callers

nothing calls this directly

Calls 2

getaddrinfoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected