Coverage for docs_src/tutorial/asyncify/tutorial001.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-09-09 01:12 +0000

1import time 1abcde

2 

3import anyio 1abcde

4 

5 

6def do_sync_work(name: str): 1abcde

7 time.sleep(1) 1abcde

8 return f"Hello, {name}" 1abcde

9 

10 

11async def main(): 1abcde

12 message = do_sync_work(name="World") 1abcde

13 print(message) 1abcde

14 

15 

16anyio.run(main) 1abcde