circuitpython/tests/basics/async_coroutine.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
267 B
Python
Raw Permalink Normal View History

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')