circuitpython/tests/extmod/uasyncio_get_event_loop.py
2023-08-22 12:57:47 -04:00

18 lines
260 B
Python

# Test get_event_loop()
try:
import asyncio
except ImportError:
print("SKIP")
raise SystemExit
async def main():
print("start")
await asyncio.sleep(0.01)
print("end")
loop = asyncio.get_event_loop()
loop.run_until_complete(main())