MCPcopy Index your code
hub / github.com/python/cpython / run_main

Method run_main

Lib/test/test_asyncio/test_sslproto.py:636–654  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

634 new_tr.close()
635
636 async def run_main():
637 on_con = self.loop.create_future()
638 on_con_lost = self.loop.create_future()
639 on_got_hello = self.loop.create_future()
640 proto = ServerProto(on_con, on_con_lost, on_got_hello)
641
642 server = await self.loop.create_server(
643 lambda: proto, '127.0.0.1', 0)
644 addr = server.sockets[0].getsockname()
645
646 with self.tcp_client(lambda sock: client(sock, addr),
647 timeout=self.TIMEOUT):
648 await asyncio.wait_for(
649 main(proto, on_con, on_con_lost, on_got_hello),
650 timeout=self.TIMEOUT)
651
652 server.close()
653 await server.wait_closed()
654 self.assertEqual(answer, ANSWER)
655
656 self.loop.run_until_complete(run_main())
657

Callers

nothing calls this directly

Calls 10

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

Tested by

no test coverage detected