fix(live/mysql): use pytest_asyncio.fixture(loop_scope=module) on mysql_repo
@pytest.fixture on an async fixture ignores loop_scope, so mysql_repo ran on the per-function loop while mysql_test_db_url's engine was bound to the module loop — triggering 'Future attached to a different loop'.
This commit is contained in:
@@ -107,7 +107,7 @@ async def mysql_test_db_url():
|
||||
await admin.dispose()
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
@pytest_asyncio.fixture(loop_scope="module")
|
||||
async def mysql_repo(mysql_test_db_url):
|
||||
"""Fresh schema per test — truncate between tests to keep them isolated."""
|
||||
repo = MySQLRepository(url=mysql_test_db_url)
|
||||
|
||||
Reference in New Issue
Block a user