We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39f79e3 commit 1ed96e5Copy full SHA for 1ed96e5
tests/test_trio_asyncio.py
@@ -36,3 +36,14 @@ async def test_half_fixtured_asyncpg_conn(asyncio_fixture_own_loop):
36
@pytest.mark.trio
37
async def test_fixtured_asyncpg_conn(asyncio_fixture_with_fixtured_loop):
38
await use_asyncio()
39
+
40
41
+@pytest.mark.trio
42
+async def test_get_running_loop():
43
+ async with trio_asyncio.open_loop() as loop:
44
+ try:
45
+ from asyncio import get_running_loop
46
+ except ImportError:
47
+ pass # Python 3.6
48
+ else:
49
+ assert get_running_loop() == loop
0 commit comments