diff options
author | Yury Selivanov <yury@magic.io> | 2016-06-28 11:00:39 -0400 |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-06-28 11:00:39 -0400 |
commit | 5eef78b1131bb720f7384b29ae99f0285d2d7fa8 (patch) | |
tree | 284291a25ef380cf2aaaf84b0333027c2cfbef5c /Lib/test | |
parent | 7c6b3ea48c4336a83a364f588ee1a0ce71230f73 (diff) | |
parent | 63bf48768867a7421f8ccb956fe77f295bfd2742 (diff) | |
download | cpython-git-5eef78b1131bb720f7384b29ae99f0285d2d7fa8.tar.gz |
Merge 3.5 (asyncio)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_asyncio/test_selector_events.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_asyncio/test_selector_events.py b/Lib/test/test_asyncio/test_selector_events.py index 5dc6ff8e66..ff71c218bb 100644 --- a/Lib/test/test_asyncio/test_selector_events.py +++ b/Lib/test/test_asyncio/test_selector_events.py @@ -373,6 +373,17 @@ class BaseSelectorEventLoopTests(test_utils.TestCase): self.loop.run_until_complete(fut) self.assertTrue(self.loop.remove_writer.called) + def test_sock_connect_resolve_using_socket_params(self): + addr = ('need-resolution.com', 8080) + sock = test_utils.mock_nonblocking_socket() + self.loop.getaddrinfo = mock.Mock() + self.loop.sock_connect(sock, addr) + while not self.loop.getaddrinfo.called: + self.loop._run_once() + self.loop.getaddrinfo.assert_called_with( + *addr, type=sock.type, family=sock.family, proto=sock.proto, + flags=0) + def test__sock_connect(self): f = asyncio.Future(loop=self.loop) |