mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
ci: match the environment with internal ones for pyink/isort/unittest
Previously submitted change is causing [Pyink error](https://github.com/google/adk-python/actions/runs/21884351396/job/63176122118) in repo because Pyink recently updated to 25.12.0. Co-authored-by: Liang Wu <wuliang@google.com> PiperOrigin-RevId: 868806575
This commit is contained in:
committed by
Copybara-Service
parent
758d337c76
commit
61c329f8ce
@@ -489,7 +489,9 @@ class TestAPIHubClient:
|
||||
MagicMock(
|
||||
status_code=200,
|
||||
json=lambda: {
|
||||
"name": "projects/test-project/locations/us-central1/apis/api1/versions/v1",
|
||||
"name": (
|
||||
"projects/test-project/locations/us-central1/apis/api1/versions/v1"
|
||||
),
|
||||
"specs": [],
|
||||
},
|
||||
), # No specs
|
||||
|
||||
@@ -371,7 +371,9 @@ def test_parse_external_ref_raises_error(openapi_spec_generator):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "external_file.json#/components/schemas/ExternalSchema"
|
||||
"$ref": (
|
||||
"external_file.json#/components/schemas/ExternalSchema"
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -200,9 +200,11 @@ async def test_run_async_1_missing_arg_sync_func():
|
||||
args = {"arg1": "test_value_1"}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `function_for_testing_with_2_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `function_for_testing_with_2_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg2
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -213,9 +215,11 @@ async def test_run_async_1_missing_arg_async_func():
|
||||
args = {"arg2": "test_value_1"}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `async_function_for_testing_with_2_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `async_function_for_testing_with_2_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg1
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -226,11 +230,13 @@ async def test_run_async_3_missing_arg_sync_func():
|
||||
args = {"arg2": "test_value_1"}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg1
|
||||
arg3
|
||||
arg4
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -241,11 +247,13 @@ async def test_run_async_3_missing_arg_async_func():
|
||||
args = {"arg3": "test_value_1"}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `async_function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `async_function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg1
|
||||
arg2
|
||||
arg4
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -256,12 +264,14 @@ async def test_run_async_missing_all_arg_sync_func():
|
||||
args = {}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg1
|
||||
arg2
|
||||
arg3
|
||||
arg4
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -272,12 +282,14 @@ async def test_run_async_missing_all_arg_async_func():
|
||||
args = {}
|
||||
result = await tool.run_async(args=args, tool_context=MagicMock())
|
||||
assert result == {
|
||||
"error": """Invoking `async_function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
"error": (
|
||||
"""Invoking `async_function_for_testing_with_4_arg_and_no_tool_context()` failed as the following mandatory input parameters are not present:
|
||||
arg1
|
||||
arg2
|
||||
arg3
|
||||
arg4
|
||||
You could retry calling this tool, but it is IMPORTANT for you to provide all the mandatory parameters."""
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
"""Tests for SetModelResponseTool."""
|
||||
|
||||
|
||||
from google.adk.agents.invocation_context import InvocationContext
|
||||
from google.adk.agents.llm_agent import LlmAgent
|
||||
from google.adk.agents.run_config import RunConfig
|
||||
|
||||
Reference in New Issue
Block a user