Skip to content

Commit 0071f5d

Browse files
committed
Fix test
1 parent f015152 commit 0071f5d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_concurrent.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import trio_asyncio
33
import asyncio
44
import pytest
5+
from trio_asyncio._loop import TrioPolicy
56

67
# Tests for concurrent or nested loops
78

@@ -46,7 +47,7 @@ async def gen_loop(i, task_status=trio.TASK_STATUS_IGNORED):
4647

4748

4849
async def _test_same_task():
49-
assert isinstance(asyncio.get_event_loop_policy(), trio_asyncio.TrioPolicy)
50+
assert isinstance(asyncio.get_event_loop_policy(), TrioPolicy)
5051

5152
def get_loop(i, loop, policy):
5253
assert loop == asyncio.get_event_loop()
@@ -55,18 +56,18 @@ def get_loop(i, loop, policy):
5556
async with trio.open_nursery():
5657
async with trio_asyncio.open_loop() as loop1:
5758
policy = asyncio.get_event_loop_policy()
58-
assert isinstance(policy, trio_asyncio.TrioPolicy)
59+
assert isinstance(policy, TrioPolicy)
5960
async with trio_asyncio.open_loop() as loop2:
6061
p2 = asyncio.get_event_loop_policy()
6162
assert policy is p2, (policy, p2)
6263
loop1.call_later(0.1, get_loop, 0, loop1, policy)
6364
loop2.call_later(0.1, get_loop, 1, loop2, policy)
6465
await trio.sleep(0.2)
6566

66-
assert isinstance(asyncio.get_event_loop_policy(), trio_asyncio.TrioPolicy)
67+
assert isinstance(asyncio.get_event_loop_policy(), TrioPolicy)
6768
assert asyncio._get_running_loop() is None
6869

6970

7071
def test_same_task():
71-
assert not isinstance(asyncio.get_event_loop_policy(), trio_asyncio.TrioPolicy)
72+
assert not isinstance(asyncio.get_event_loop_policy(), TrioPolicy)
7273
trio.run(_test_same_task)

0 commit comments

Comments
 (0)