diff options
Diffstat (limited to 'Lib/test/test_asyncio/test_selector_events.py')
-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 5dc6ff8..ff71c21 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) |