Python asyncio.proactor_events() Examples

The following are 1 code examples of asyncio.proactor_events(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module asyncio , or try the search function .
Example #1
Source File: test_proactor_events.py    From android_universal with MIT License 5 votes vote down vote up
def setUp(self):
        super().setUp()

        self.sock = test_utils.mock_nonblocking_socket()
        self.proactor = mock.Mock()

        self.ssock, self.csock = mock.Mock(), mock.Mock()

        with mock.patch('asyncio.proactor_events.socket.socketpair',
                        return_value=(self.ssock, self.csock)):
            self.loop = BaseProactorEventLoop(self.proactor)
        self.set_event_loop(self.loop)