MCPcopy Create free account
hub / github.com/EasyIME/PIME / skipIfLocalhostV4

Method skipIfLocalhostV4

python/python3/tornado/test/tcpclient_test.py:82–88  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 3

Calls 4

ResolverClass · 0.90
run_syncMethod · 0.80
resolveMethod · 0.45
skipTestMethod · 0.45

Tested by

no test coverage detected