From f067bb8c52a2a3b849bb94a741133fcea76bf98f Mon Sep 17 00:00:00 2001 From: Xiaofang Wu <3642115339@qq.com> Date: Tue, 28 Apr 2026 16:21:19 +0800 Subject: [PATCH 1/2] fix(pyproject): restore dev extra for pip-based CI --- pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 642b5da3..e4b13b51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,12 @@ dependencies = [ ] [project.optional-dependencies] +dev = [ + "pytest>=9.0.0,<10.0.0", + "pytest-asyncio>=1.3.0,<2.0.0", + "pexpect>=4.9.0,<5.0.0", + "ruff>=0.1.0", +] wecom = [ "wecom-aibot-sdk-python>=0.1.5", ] From 1b5b2fdd3b95b957febf201a43ea13a82dfcdd93 Mon Sep 17 00:00:00 2001 From: Xiaofang Wu <3642115339@qq.com> Date: Wed, 29 Apr 2026 18:19:59 +0800 Subject: [PATCH 2/2] test: make PTY Ctrl+C assertion tolerant to EOF exit path --- tests/integration/test_agent_pty.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_agent_pty.py b/tests/integration/test_agent_pty.py index c04df4a4..fe64b4e0 100644 --- a/tests/integration/test_agent_pty.py +++ b/tests/integration/test_agent_pty.py @@ -48,8 +48,16 @@ def test_agent_ctrl_c(simulated_agent_child) -> None: child = simulated_agent_child child.expect(r"You:", timeout=15) child.sendintr() - child.expect(r"Received SIGINT, goodbye!", timeout=10) - child.close(force=True) + idx = child.expect([r"Received SIGINT, goodbye!", r"Goodbye!", pexpect.EOF], timeout=10) + transcript = child.before + + if idx in (0, 1): + transcript += child.after + child.expect([r"Resume this session:", pexpect.EOF, pexpect.TIMEOUT], timeout=5) + transcript += child.before + + assert "Traceback" not in transcript + assert "KeyboardInterrupt" not in transcript @pytest.mark.pty