Closed
Description
My testcase get the error of "attached to a different loop" in 0.11.0 but works fine in 0.10.0
The detail is I have the following code in my testcase:
asyncio.get_event_loop().run_in_executor(...)
Is there any related change in 0.11.0?
A simple testcase for reproducing:
import asyncio
import pytest
@pytest.fixture(scope='function')
async def loop():
return asyncio.get_event_loop()
def foo():
return 0
@pytest.mark.asyncio
async def test_async(loop):
await loop.run_in_executor(None, foo)
Metadata
Metadata
Assignees
Labels
No labels