File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 import trio_asyncio
1212
1313
14- @trio_asyncio .trio2aio
15- async def work_in_asyncio ():
16- await asyncio .sleep (0 )
14+ async def use_run_asyncio ():
15+ await trio_asyncio .run_asyncio (asyncio .sleep , 0 )
1716
1817
1918@pytest .fixture ()
@@ -26,29 +25,29 @@ async def asyncio_loop():
2625@pytest .fixture ()
2726@async_generator
2827async def asyncio_fixture_with_fixtured_loop (asyncio_loop ):
29- await work_in_asyncio ()
28+ await use_run_asyncio ()
3029 await yield_ ()
3130
3231
3332@pytest .fixture ()
3433@async_generator
3534async def asyncio_fixture_own_loop ():
3635 async with trio_asyncio .open_loop ():
37- await work_in_asyncio ()
36+ await use_run_asyncio ()
3837 await yield_ ()
3938
4039
4140@pytest .mark .trio
4241async def test_no_fixture ():
4342 async with trio_asyncio .open_loop ():
44- await work_in_asyncio ()
43+ await use_run_asyncio ()
4544
4645
4746@pytest .mark .trio
4847async def test_half_fixtured_asyncpg_conn (asyncio_fixture_own_loop ):
49- await work_in_asyncio ()
48+ await use_run_asyncio ()
5049
5150
5251@pytest .mark .trio
5352async def test_fixtured_asyncpg_conn (asyncio_fixture_with_fixtured_loop ):
54- await work_in_asyncio ()
53+ await use_run_asyncio ()
You can’t perform that action at this time.
0 commit comments