From b1ec10e33e00bfaafc71d89082f84a02e6056bd2 Mon Sep 17 00:00:00 2001 From: Danyal Ahmed <58849388+danyalahmed1995@users.noreply.github.com> Date: Wed, 13 May 2026 05:56:38 +0500 Subject: [PATCH] fix(tests): skip bash tool tests on Windows Skips `test_bash_tool.py` at module level on Windows because it imports Python's Unix-only `resource` module during collection. Validation: - `python -m pytest tests/unittests/tools/test_bash_tool.py -q` - `python -m pytest tests/unittests/platform -q` - `python -m pytest tests/unittests/utils/test_env_utils.py -q` - `git diff --check` --- tests/unittests/tools/test_bash_tool.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/unittests/tools/test_bash_tool.py b/tests/unittests/tools/test_bash_tool.py index 772db385a6..d0e01136e0 100644 --- a/tests/unittests/tools/test_bash_tool.py +++ b/tests/unittests/tools/test_bash_tool.py @@ -13,14 +13,20 @@ # limitations under the License. import asyncio -import resource import signal +import sys from unittest import mock +import pytest + +if sys.platform == "win32": + pytest.skip("bash tool tests require Unix resource module", allow_module_level=True) + +import resource + from google.adk.tools import bash_tool from google.adk.tools import tool_context from google.adk.tools.tool_confirmation import ToolConfirmation -import pytest @pytest.fixture