From 7ae8ddfb2c86c7c9bd6a97cf18d957ca59e90edb Mon Sep 17 00:00:00 2001 From: goodboy Date: Tue, 30 Jun 2026 02:45:50 -0400 Subject: [PATCH] Skip `infect_asyncio` tests on Windows `tractor`'s infect-asyncio mode runs an `asyncio` loop under `trio` guest-mode; on Windows the default `ProactorEventLoop` is incompatible and the suite hangs/crashes mid-run (orphaned py procs), so the `windows-latest` CI leg never finishes reporting. - add a module-level `pytest.skip(allow_module_level=True)` gated on `platform.system() == 'Windows'` to `test_infected_asyncio` and `test_root_infect_asyncio`, before their asyncio-interop imports. macOS/linux are unaffected (they run these fine). (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-code --- tests/test_infected_asyncio.py | 12 ++++++++++++ tests/test_root_infect_asyncio.py | 11 +++++++++++ 2 files changed, 23 insertions(+) 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, )