diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-06-13 03:17:47 (GMT) |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-06-13 03:17:47 (GMT) |
commit | 5fc7c4dce18f332343bb6999477a18791a25b69e (patch) | |
tree | 67c2998d3d7cd5833715b20e57bee3fb9a507fa1 | |
parent | 97484780863a94a33ac82c63a6c6ab0a53485277 (diff) | |
download | cpython-5fc7c4dce18f332343bb6999477a18791a25b69e.zip cpython-5fc7c4dce18f332343bb6999477a18791a25b69e.tar.gz cpython-5fc7c4dce18f332343bb6999477a18791a25b69e.tar.bz2 |
Issue #27136: Change test to use ::1 for better OS X Tiger compatibility
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index 0807dfb..206ebc6 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -1185,14 +1185,14 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase): test_utils.run_briefly(self.loop) # allow transport to close 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) try: - # Without inet_pton we use getaddrinfo, which transforms ('::2', 80) - # to ('::0.0.0.2', 80, 0, 0). The last 0s are flow info, scope id. + # Without inet_pton we use getaddrinfo, which transforms ('::1', 80) + # to ('::1', 80, 0, 0). The last 0s are flow info, scope id. [address] = sock.connect.call_args[0] host, port = address[:2] - self.assertRegex(host, r'::(0\.)*2') + self.assertRegex(host, r'::(0\.)*1') self.assertEqual(port, 80) _, kwargs = m_socket.socket.call_args self.assertEqual(kwargs['family'], m_socket.AF_INET6) |