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

Method main

Lib/test/test_asyncio/test_streams.py:920–926  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

918 drained += 1
919
920 async def main():
921 loop = asyncio.get_running_loop()
922 stream = asyncio.streams.FlowControlMixin(loop)
923 stream.pause_writing()
924 loop.call_later(0.1, stream.resume_writing)
925 await asyncio.gather(*[drainer(stream) for _ in range(10)])
926 self.assertEqual(drained, 10)
927
928 self.loop.run_until_complete(main())
929

Callers 1

test_streams.pyFile · 0.45

Calls 10

pause_writingMethod · 0.95
assertIsNotNoneMethod · 0.80
assertListEqualMethod · 0.80
call_laterMethod · 0.45
gatherMethod · 0.45
assertEqualMethod · 0.45
start_serverMethod · 0.45
start_servingMethod · 0.45
closeMethod · 0.45
wait_closedMethod · 0.45

Tested by

no test coverage detected