blob: 38c2f13f353ce06ac0aadbc7f3900b9e736e54c1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
"""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())
|