MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_main

Method run_main

Lib/test/test_asyncio/test_ssl.py:1022–1039  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 9

tcp_clientMethod · 0.95
ServerProtoClass · 0.70
mainFunction · 0.50
create_futureMethod · 0.45
create_serverMethod · 0.45
getsocknameMethod · 0.45
wait_forMethod · 0.45
closeMethod · 0.45
wait_closedMethod · 0.45

Tested by

no test coverage detected