"""Repo-wide pytest configuration.""" import asyncio import sys # aiortc's ICE stack (aioice) never completes a loopback DataChannel handshake # on Windows' default ProactorEventLoop — test_webrtc_transport.py hangs # indefinitely, and with no per-test timeout it took the whole run down with it. # A SelectorEventLoop is aiortc's documented requirement on Windows. The # trade-off: SelectorEventLoop cannot spawn subprocesses on Windows, so the # ffmpeg/ffprobe streaming tests fail here rather than pass and need a per-module # Proactor override or skipif(win32). Set at import, before any loop is created; # no effect off Windows, where the default policy already works for both. if sys.platform == "win32": asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())