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

Method main

Lib/test/test_asyncio/test_sslproto.py:617–634  ·  view source on GitHub ↗
(proto, on_con, on_con_lost, on_got_hello)

Source from the content-addressed store, hash-verified

615 self.on_con_lost.set_exception(exc)
616
617 async def main(proto, on_con, on_con_lost, on_got_hello):
618 tr = await on_con
619 tr.write(HELLO_MSG)
620
621 self.assertEqual(proto.data, b'')
622
623 new_tr = await self.loop.start_tls(
624 tr, proto, server_context,
625 server_side=True,
626 ssl_handshake_timeout=self.TIMEOUT)
627 proto.replace_transport(new_tr)
628
629 await on_got_hello
630 new_tr.write(ANSWER)
631
632 await on_con_lost
633 self.assertEqual(proto.data, HELLO_MSG)
634 new_tr.close()
635
636 async def run_main():
637 on_con = self.loop.create_future()

Callers 1

test_sslproto.pyFile · 0.45

Calls 6

replace_transportMethod · 0.80
assertRaisesRegexMethod · 0.80
writeMethod · 0.45
assertEqualMethod · 0.45
start_tlsMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected