Coverage for docs_src/tutorial/runnify/tutorial001.py: 100%
10 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 01:12 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 01:12 +0000
1import anyio 1abcde
2import asyncer 1abcde
5async def do_work(name: str): 1abcde
6 await anyio.sleep(1) 1abcde
7 return f"Hello, {name}" 1abcde
10async def main(name: str): 1abcde
11 result = await do_work(name=name) 1abcde
12 return result 1abcde
15result = asyncer.runnify(main)(name="World") 1abcde
16print(result) 1abcde