From 1656664a47e54793ed2fb87c607262c9cfe0e699 Mon Sep 17 00:00:00 2001 From: chengyongru Date: Wed, 12 Aug 2026 13:44:44 +0800 Subject: [PATCH] test(exec): isolate Windows platform mock --- tests/tools/test_exec_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tools/test_exec_platform.py b/tests/tools/test_exec_platform.py index 890c8b29b..637a3ec60 100644 --- a/tests/tools/test_exec_platform.py +++ b/tests/tools/test_exec_platform.py @@ -160,7 +160,7 @@ class TestSpawnWindows: with ( patch("nanobot.agent.tools.shell._IS_WINDOWS", True), - patch("nanobot.agent.tools.shell.sys.platform", "win32"), + patch("nanobot.agent.tools.shell.sys", MagicMock(platform="win32")), patch("asyncio.create_subprocess_exec", new_callable=AsyncMock) as mock_exec, patch.object(ExecTool, "_create_windows_job", return_value=job), pytest.raises(OSError, match="OpenProcess failed"),