()
| 1020 | new_tr.close() |
| 1021 | |
| 1022 | async def run_main(): |
| 1023 | on_con = self.loop.create_future() |
| 1024 | on_eof = self.loop.create_future() |
| 1025 | on_con_lost = self.loop.create_future() |
| 1026 | proto = ServerProto(on_con, on_eof, on_con_lost) |
| 1027 | |
| 1028 | server = await self.loop.create_server( |
| 1029 | lambda: proto, '127.0.0.1', 0) |
| 1030 | addr = server.sockets[0].getsockname() |
| 1031 | |
| 1032 | with self.tcp_client(lambda sock: client(sock, addr), |
| 1033 | timeout=self.TIMEOUT): |
| 1034 | await asyncio.wait_for( |
| 1035 | main(proto, on_con, on_eof, on_con_lost), |
| 1036 | timeout=self.TIMEOUT) |
| 1037 | |
| 1038 | server.close() |
| 1039 | await server.wait_closed() |
| 1040 | |
| 1041 | self.loop.run_until_complete(run_main()) |
| 1042 |
nothing calls this directly
no test coverage detected