Skip to content

Commit 917b4fe

Browse files
committed
coverage: test not Future case in allow_asyncio
1 parent 40fba89 commit 917b4fe

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

tests/interop/test_adapter.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -197,13 +197,6 @@ async def run_asyncio_trio(self, loop):
197197
assert res == 8
198198
assert sth.flag == 2
199199

200-
async def run_asyncio_trio_adapted(self, loop):
201-
"""Call asyncio from trio"""
202-
sth = SomeThing(loop)
203-
res = await sth.dly_trio_adapted()
204-
assert res == 8
205-
assert sth.flag == 2
206-
207200
@pytest.mark.trio
208201
async def test_asyncio_trio(self, loop):
209202
await allow_asyncio(self.run_asyncio_trio, loop)
@@ -230,6 +223,16 @@ async def run_trio_asyncio_future(self, loop):
230223
async def test_trio_asyncio_future(self, loop):
231224
await allow_asyncio(self.run_trio_asyncio_future, loop)
232225

226+
async def run_trio_asyncio_adapted(self, loop):
227+
sth = SomeThing(loop)
228+
res = await sth.dly_asyncio_adapted()
229+
assert res == 4
230+
assert sth.flag == 1
231+
232+
@pytest.mark.trio
233+
async def test_trio_asyncio_adapted(self, loop):
234+
await allow_asyncio(self.run_trio_asyncio_adapted, loop)
235+
233236
async def run_trio_asyncio_iter(self, loop):
234237
sth = SomeThing(loop)
235238
n = 0

0 commit comments

Comments
 (0)