summaryrefslogtreecommitdiffstatshomepage
path: root/tests/extmod/asyncio_get_event_loop.py
blob: bbc1a6b2dce9551a11092d3e7779abb81d7d9bca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Test get_event_loop()
# Note: CPython deprecated get_event_loop() so this test needs a .exp

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