Skip to content

Commit eb82c9e

Browse files
committed
Clean up test file formatting and whitespace throughout python conformance and adk test suites
1 parent 4e7d87e commit eb82c9e

3 files changed

Lines changed: 13 additions & 12 deletions

File tree

agent_sdks/python/tests/adk/test_send_a2ui_to_client_toolset.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,6 @@ def test_converter_class_convert_function_call_ignores():
357357
assert len(a2a_parts) == 0
358358

359359

360-
361-
362-
363360
def test_converter_class_convert_other_part():
364361
catalog_mock = MagicMock(spec=A2uiCatalog)
365362
converter = A2uiPartConverter(catalog_mock)

agent_sdks/python/tests/conformance/test_a2a_integration.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,28 @@
1717
import yaml
1818
import pytest
1919

20+
2021
def _get_conformance_path(filename):
2122
return os.path.abspath(
2223
os.path.join(os.path.dirname(__file__), "../../../conformance", filename)
2324
)
2425

26+
2527
def load_tests(filename):
2628
path = _get_conformance_path(os.path.join("suites", filename))
2729
with open(path, "r", encoding="utf-8") as f:
2830
return yaml.safe_load(f)
2931

32+
3033
def get_conformance_cases(filename):
3134
cases = load_tests(filename)
3235
return [(case["name"], case) for case in cases]
3336

37+
3438
# --- A2A Integration Conformance ---
3539
cases_a2a_integration = get_conformance_cases("a2a_integration.yaml")
3640

41+
3742
@pytest.mark.parametrize(
3843
"name, test_case",
3944
cases_a2a_integration,
@@ -110,9 +115,7 @@ def test_a2a_integration_conformance(name, test_case):
110115
context.add_activated_extension.assert_not_called()
111116
else:
112117
assert result_version == expect["version"]
113-
context.add_activated_extension.assert_called_once_with(
114-
expect["activated"]
115-
)
118+
context.add_activated_extension.assert_called_once_with(expect["activated"])
116119

117120
elif action == "select_newest":
118121
requested = args["requested"]

agent_sdks/python/tests/conformance/test_adk_extensions.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,28 @@
1818
import asyncio
1919
import pytest
2020

21+
2122
def _get_conformance_path(filename):
2223
return os.path.abspath(
2324
os.path.join(os.path.dirname(__file__), "../../../conformance", filename)
2425
)
2526

27+
2628
def load_tests(filename):
2729
path = _get_conformance_path(os.path.join("suites", filename))
2830
with open(path, "r", encoding="utf-8") as f:
2931
return yaml.safe_load(f)
3032

33+
3134
def get_conformance_cases(filename):
3235
cases = load_tests(filename)
3336
return [(case["name"], case) for case in cases]
3437

38+
3539
# --- ADK Extensions Conformance ---
3640
cases_adk_extensions = get_conformance_cases("adk_extensions.yaml")
3741

42+
3843
@pytest.mark.parametrize(
3944
"name, test_case",
4045
cases_adk_extensions,
@@ -55,18 +60,14 @@ def test_adk_extensions_conformance(name, test_case):
5560
catalog_mock = MagicMock(spec=A2uiCatalog)
5661
catalog_mock.validator.validate.return_value = None
5762

58-
tool = SendA2uiToClientToolset._SendA2uiJsonToClientTool(
59-
catalog_mock, "examples"
60-
)
63+
tool = SendA2uiToClientToolset._SendA2uiJsonToClientTool(catalog_mock, "examples")
6164

6265
tool_context_mock = MagicMock()
6366
tool_context_mock.state = {}
6467
tool_context_mock.actions = MagicMock(skip_summarization=False)
6568

6669
# run_async is async in Python
67-
result = asyncio.run(
68-
tool.run_async(args=tool_args, tool_context=tool_context_mock)
69-
)
70+
result = asyncio.run(tool.run_async(args=tool_args, tool_context=tool_context_mock))
7071

7172
expect = test_case["expect"]
7273
expect_success = expect["success"]

0 commit comments

Comments
 (0)