Files
openide/python/testData/debug/stepping/test_step_over_await.py
Andrey Lisin 2f87d7c3ae IDEA-CR-58850: PY-24748 Support step over for coroutines
(cherry picked from commit b66707327989822f23c57aa19fa81dd38a02ed67)

GitOrigin-RevId: e85b75676c138cf9ce2de0ac07a88f19a730f5c0
2020-03-02 16:09:44 +00:00

19 lines
358 B
Python

import asyncio
async def compute(x, y):
print("Compute %s + %s ..." % (x, y))
await asyncio.sleep(1.0)
return x + y
async def print_sum(x, y):
result = await compute(x, y) # breakpoint and Step Over
print("%s + %s = %s" % (x, y, result))
z = 42
loop = asyncio.get_event_loop()
loop.run_until_complete(print_sum(1, 2))
loop.close()