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

Method main

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

Source from the content-addressed store, hash-verified

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