tests: Rename uasyncio to asyncio.
This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
2fbc08c462
commit
6027c41c8f
21
tests/extmod/asyncio_basic2.py
Normal file
21
tests/extmod/asyncio_basic2.py
Normal file
@@ -0,0 +1,21 @@
|
||||
try:
|
||||
import asyncio
|
||||
except ImportError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def forever():
|
||||
print("forever start")
|
||||
await asyncio.sleep(10)
|
||||
|
||||
|
||||
async def main():
|
||||
print("main start")
|
||||
asyncio.create_task(forever())
|
||||
await asyncio.sleep(0.001)
|
||||
print("main done")
|
||||
return 42
|
||||
|
||||
|
||||
print(asyncio.run(main()))
|
||||
Reference in New Issue
Block a user