Commit 2e852522 authored by Damien George's avatar Damien George

tests/extmod: Add .exp test files for asyncio.get_event_loop tests.

And use `asyncio.new_event_loop()` where possible.  This change is needed
because CPython 3.12 deprecated the `get_event_loop()` function.
Signed-off-by: default avatarDamien George <damien@micropython.org>
parent 1ea06b99
# Test get_event_loop()
# Note: CPython deprecated get_event_loop() so this test needs a .exp
try:
import asyncio
......
......@@ -34,7 +34,7 @@ async def main():
loop.stop()
loop = asyncio.get_event_loop()
loop = asyncio.new_event_loop()
loop.create_task(main())
for i in range(3):
......
# Test Loop.new_event_loop()
# Note: CPython deprecated get_event_loop() so this test needs a .exp
try:
import asyncio
......
start
task 0
stop
start
task 0
stop
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment