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

Method run_main

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

Source from the content-addressed store, hash-verified

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

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