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-codewindows_support_round2
parent
9f36e743a9
commit
7ae8ddfb2c
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue