23 lines
435 B
Python
23 lines
435 B
Python
"""
|
|
Root conftest for all tests.
|
|
|
|
Configures pytest-asyncio to use session-scoped event loop.
|
|
"""
|
|
|
|
import asyncio
|
|
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def event_loop():
|
|
"""
|
|
Create session-scoped event loop.
|
|
|
|
This ensures all async fixtures use the SAME event loop
|
|
across all test files in the session.
|
|
"""
|
|
loop = asyncio.get_event_loop_policy().new_event_loop()
|
|
yield loop
|
|
loop.close()
|