Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/tests/extmod/asyncio_basic2.py

22 lines
337 B
Python
Raw Normal View History

tests/extmod: Add uasyncio tests. All .exp files are included because they require CPython 3.8 which may not always be available.
2019-11-13 21:08:22 +11:00
try:
tests: Rename uasyncio to asyncio. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 16:01:38 +10:00
import asyncio
tests/extmod: Add uasyncio tests. All .exp files are included because they require CPython 3.8 which may not always be available.
2019-11-13 21:08:22 +11:00
except ImportError:
tests: Rename uasyncio to asyncio. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-06-08 16:01:38 +10:00
print("SKIP")
raise SystemExit
tests/extmod: Add uasyncio tests. All .exp files are included because they require CPython 3.8 which may not always be available.
2019-11-13 21:08:22 +11:00
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 Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 117ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API