Skip to content

Commit 98ba48b

Browse files
committed
THIS TIME FOR SURE
1 parent b0559c1 commit 98ba48b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

pytest_trio/_tests/test_trio_asyncio.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
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
2827
async 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
3534
async 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
4241
async 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
4847
async 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
5352
async def test_fixtured_asyncpg_conn(asyncio_fixture_with_fixtured_loop):
54-
await work_in_asyncio()
53+
await use_run_asyncio()

0 commit comments

Comments
 (0)