diff --git a/tests/test_infected_asyncio.py b/tests/test_infected_asyncio.py index bdb1b852..4787fbbb 100644 --- a/tests/test_infected_asyncio.py +++ b/tests/test_infected_asyncio.py @@ -20,6 +20,18 @@ from typing import ( import pytest import trio import tractor + +# `infect_asyncio` mode is unsupported on Windows (asyncio's +# `ProactorEventLoop` is incompatible with our `trio` guest-mode +# interop and currently hangs/crashes the run). Skip the module on +# Windows so the CI leg completes + reports the rest of the suite. +import platform +if platform.system() == 'Windows': + pytest.skip( + 'infect_asyncio mode is unsupported on Windows', + allow_module_level=True, + ) + from tractor import ( current_actor, Actor, diff --git a/tests/test_root_infect_asyncio.py b/tests/test_root_infect_asyncio.py index e7a307bc..cde5577f 100644 --- a/tests/test_root_infect_asyncio.py +++ b/tests/test_root_infect_asyncio.py @@ -9,6 +9,17 @@ from functools import partial import pytest import trio import tractor + +# `infect_asyncio` mode is unsupported on Windows (see +# `test_infected_asyncio`); skip at COLLECTION before the +# asyncio-interop imports below so the CI leg completes. +import platform +if platform.system() == 'Windows': + pytest.skip( + 'infect_asyncio mode is unsupported on Windows', + allow_module_level=True, + ) + from tractor import ( to_asyncio, )