MCPcopy
hub / github.com/tornadoweb/tornado / skipIfLocalhostV4

Method skipIfLocalhostV4

tornado/test/tcpclient_test.py:79–85  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

77 super().tearDown()
78
79 def skipIfLocalhostV4(self):
80 # The port used here doesn't matter, but some systems require it
81 # to be non-zero if we do not also pass AI_PASSIVE.
82 addrinfo = self.io_loop.run_sync(lambda: Resolver().resolve("localhost", 80))
83 families = {addr[0] for addr in addrinfo}
84 if socket.AF_INET6 not in families:
85 self.skipTest("localhost does not resolve to ipv6")
86
87 @gen_test
88 def do_test_connect(self, family, host, source_ip=None, source_port=None):

Callers 3

Calls 3

ResolverClass · 0.90
run_syncMethod · 0.80
resolveMethod · 0.45

Tested by

no test coverage detected