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

Method main

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

Source from the content-addressed store, hash-verified

143 writer = asyncio.StreamWriter(transport, protocol, reader, self.loop)
144
145 async def main():
146 # writes data to transport
147 async def write():
148 writer.write(data)
149 await writer.drain()
150
151 # try to write for the first time
152 await write()
153 # try to write for the second time, this raises as the connection_lost
154 # callback should be done with error
155 with self.assertRaises(ConnectionResetError):
156 await write()
157
158 self.loop.run_until_complete(main())
159

Callers

nothing calls this directly

Calls 2

writeFunction · 0.50
assertRaisesMethod · 0.45

Tested by

no test coverage detected