Kaydet (Commit) 9b1f4431 authored tarafından Martin Panter's avatar Martin Panter

Issue #27136: Merge test_asyncio fix from 3.5

...@@ -1185,14 +1185,14 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): ...@@ -1185,14 +1185,14 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
test_utils.run_briefly(self.loop) # allow transport to close test_utils.run_briefly(self.loop) # allow transport to close
sock.family = socket.AF_INET6 sock.family = socket.AF_INET6
coro = self.loop.create_connection(asyncio.Protocol, '::2', 80) coro = self.loop.create_connection(asyncio.Protocol, '::1', 80)
t, p = self.loop.run_until_complete(coro) t, p = self.loop.run_until_complete(coro)
try: try:
# Without inet_pton we use getaddrinfo, which transforms ('::2', 80) # Without inet_pton we use getaddrinfo, which transforms ('::1', 80)
# to ('::0.0.0.2', 80, 0, 0). The last 0s are flow info, scope id. # to ('::1', 80, 0, 0). The last 0s are flow info, scope id.
[address] = sock.connect.call_args[0] [address] = sock.connect.call_args[0]
host, port = address[:2] host, port = address[:2]
self.assertRegex(host, r'::(0\.)*2') self.assertRegex(host, r'::(0\.)*1')
self.assertEqual(port, 80) self.assertEqual(port, 80)
_, kwargs = m_socket.socket.call_args _, kwargs = m_socket.socket.call_args
self.assertEqual(kwargs['family'], m_socket.AF_INET6) self.assertEqual(kwargs['family'], m_socket.AF_INET6)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment