diff --git a/tests/test_app_widgets.py b/tests/test_app_widgets.py index 86933a77..7ce5c642 100644 --- a/tests/test_app_widgets.py +++ b/tests/test_app_widgets.py @@ -5,8 +5,9 @@ import sys import pytest -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") +# R123 (#401) 后 Windows 已有原生 TUI(Win32Console),但 app.py 交互测试依赖 +# 终端输入/信号行为(SIGWINCH/raw mode),Windows CI 冒烟阶段不可靠 → 仍跳过。 +pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="app 交互测试依赖 POSIX 终端行为(SIGWINCH/raw mode)") from emrg.client.python_tui.widgets.base import Line, RenderContext, Span, Widget from emrg.client.app import ProjectSelector, ModelSelector diff --git a/tests/test_buffer.py b/tests/test_buffer.py index de83c096..13efac12 100644 --- a/tests/test_buffer.py +++ b/tests/test_buffer.py @@ -8,12 +8,6 @@ from __future__ import annotations -import sys -import pytest - -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") - from rich.style import Style from emrg.client.python_tui.buffer import Buffer, Cell, CellWidth, write_lines_to_buffer diff --git a/tests/test_daemon_manager.py b/tests/test_daemon_manager.py index 10eec195..6f1d73cd 100644 --- a/tests/test_daemon_manager.py +++ b/tests/test_daemon_manager.py @@ -16,8 +16,10 @@ import sys -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") +# R123 (#401) 后 Windows 已有原生 TUI,但 daemon_manager 测试覆盖 daemon 生命周期 +# (spawn/信号/超时语义),Windows 上 CREATE_NEW_PROCESS_GROUP 等行为与 POSIX 不同 +# → Windows CI 冒烟阶段仍跳过(纯逻辑测试见 test_buffer/test_output/test_input_parser)。 +pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="daemon 生命周期测试依赖 POSIX 进程语义(Windows CI 冒烟不跑)") from emrg.client import daemon_manager diff --git a/tests/test_daemon_manager_e2e.py b/tests/test_daemon_manager_e2e.py index baf69e03..3f22528f 100644 --- a/tests/test_daemon_manager_e2e.py +++ b/tests/test_daemon_manager_e2e.py @@ -19,8 +19,10 @@ import sys -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") +# R123 (#401) 后 Windows 已有原生 TUI,但 e2e 测试 spawn 真实 daemon + asyncio +# 事件循环行为(ProactorEventLoop 无 add_reader)与 POSIX 差异大 → Windows CI +# 冒烟阶段仍跳过(纯逻辑测试见 test_buffer/test_output/test_input_parser)。 +pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="e2e 测试依赖 POSIX daemon spawn/事件循环语义(Windows CI 冒烟不跑)") from emrg.client import daemon_manager from tests.test_ws_e2e import _boot_server, _make_config, _make_fake_chat_stream diff --git a/tests/test_input_parser.py b/tests/test_input_parser.py index f856cdc5..9eedc632 100644 --- a/tests/test_input_parser.py +++ b/tests/test_input_parser.py @@ -1,11 +1,5 @@ """Tests for InputParser — byte-stream → complete key sequences, including UTF-8.""" -import pytest - -import sys - -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") from emrg.client.python_tui.events import InputParser, _utf8_len diff --git a/tests/test_output.py b/tests/test_output.py index e4cad8a0..2196b22a 100644 --- a/tests/test_output.py +++ b/tests/test_output.py @@ -7,12 +7,6 @@ from __future__ import annotations -import sys -import pytest - -# TUI (python_tui) 依赖 POSIX-only fcntl/termios/tty——Windows 跳过(Windows 冒烟不跑 TUI) -pytestmark = pytest.mark.skipif(sys.platform == "win32", reason="TUI is POSIX-only (fcntl/termios)") - from rich.style import Style from emrg.client.python_tui.output import style_diff_sgr, style_to_sgr