summaryrefslogtreecommitdiff
path: root/tests/basics/async_coroutine.py
blob: 791f6df14c0961d68dd207b5b522d7830acdca9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
async def f():
    pass

try:
    f()  # Should not crash
except Exception as e:
    print('failed to invoke')

try:
    next(f())
    print('This should fail because async def returns a coroutine, and next() is not allowed')
except Exception as e:
    print('pass')