Files
RockChinQandmultica-agent c945d80b9c test: isolate the asyncio policy for Core tests (#3089)
* test: await workspace limits on the pytest event loop

Co-authored-by: multica-agent <github@multica.ai>

* test: select the vector CI shard

Co-authored-by: multica-agent <github@multica.ai>

* test: isolate the session event loop policy

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: multica-agent <github@multica.ai>
2026-11-19 10:45:56 +08:00

21 lines
565 B
Python

"""Repository-wide test execution policy."""
import asyncio
import pytest
pytest_plugins = ['tests.utils.required_suites', 'tests.utils.plugin_installations']
@pytest.fixture(scope='session')
def event_loop_policy():
"""Start pytest-asyncio without an implicit loop for other runners to orphan."""
previous = asyncio.get_event_loop_policy()
policy = asyncio.DefaultEventLoopPolicy()
policy.set_event_loop(None)
asyncio.set_event_loop_policy(policy)
try:
yield policy
finally:
asyncio.set_event_loop_policy(previous)