From d672349ddff61858c29d3d2dbfcf0697712312e6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 6 Nov 2025 11:21:20 -0800 Subject: [PATCH] chore: Fix spelling in tests Merge https://github.com/google/adk-python/pull/3402 This PR corrects misspellings identified by the [check-spelling action](https://github.com/marketplace/actions/check-spelling) Note: while I use tooling to identify errors, the tooling doesn't _actually_ provide the corrections, I'm picking them on my own. I'm a human, and I may make mistakes. ### Testing Plan The misspellings have been reported at https://github.com/jsoref/adk-python/actions/runs/19056081305/attempts/1#summary-54426435973 The action reports that the changes in this PR would make it happy: https://github.com/jsoref/adk-python/actions/runs/19056081446/attempts/1#summary-54426436321 **Unit Tests:** - [ ] I have added or updated unit tests for my change. - [ ] All unit tests pass locally. _Please include a summary of passed `pytest` results._ **Manual End-to-End (E2E) Tests:** _Please provide instructions on how to manually test your changes, including any necessary setup or configuration. Please provide logs or screenshots to help reviewers better understand the fix._ ### Checklist - [x] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document. - [x] I have performed a self-review of my own code. - [ ] I have commented my code, particularly in hard-to-understand areas. - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] New and existing unit tests pass locally with my changes. - [ ] I have manually tested my changes end-to-end. - [ ] Any dependent changes have been merged and published in downstream modules. ### Additional context - https://github.com/google/adk-python/pull/3382#issuecomment-3488654110 Co-authored-by: Liang Wu COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/3402 from jsoref:spelling-tests 3cf0439d0584e4557179c25596aadf3b5b7c3fa8 PiperOrigin-RevId: 829035089 --- .../trip_planner_agent/trip_inquiry_multi_turn.test.json | 2 +- ..._agent_in_fixture.py => test_evaluate_agent_in_fixture.py} | 0 tests/unittests/agents/test_remote_a2a_agent.py | 4 ++-- tests/unittests/cli/test_fast_api.py | 2 +- tests/unittests/cli/utils/test_agent_loader.py | 2 +- .../code_executors/test_agent_engine_sandbox_code_executor.py | 2 +- tests/unittests/evaluation/test_hallucinations_v1.py | 2 +- tests/unittests/telemetry/test_functional.py | 2 +- .../tools/openapi_tool/openapi_spec_parser/test.yaml | 2 +- tests/unittests/tools/test_base_google_credentials_manager.py | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) rename tests/integration/{test_evalute_agent_in_fixture.py => test_evaluate_agent_in_fixture.py} (100%) diff --git a/tests/integration/fixture/trip_planner_agent/trip_inquiry_multi_turn.test.json b/tests/integration/fixture/trip_planner_agent/trip_inquiry_multi_turn.test.json index 610f5a3e..4b8c7b8e 100644 --- a/tests/integration/fixture/trip_planner_agent/trip_inquiry_multi_turn.test.json +++ b/tests/integration/fixture/trip_planner_agent/trip_inquiry_multi_turn.test.json @@ -89,7 +89,7 @@ { "id": null, "args": { - "agent_name": "indentify_agent" + "agent_name": "identify_agent" }, "name": "transfer_to_agent" } diff --git a/tests/integration/test_evalute_agent_in_fixture.py b/tests/integration/test_evaluate_agent_in_fixture.py similarity index 100% rename from tests/integration/test_evalute_agent_in_fixture.py rename to tests/integration/test_evaluate_agent_in_fixture.py diff --git a/tests/unittests/agents/test_remote_a2a_agent.py b/tests/unittests/agents/test_remote_a2a_agent.py index fc93e8dd..9939b80f 100644 --- a/tests/unittests/agents/test_remote_a2a_agent.py +++ b/tests/unittests/agents/test_remote_a2a_agent.py @@ -697,7 +697,7 @@ class TestRemoteA2aAgentMessageHandling: @pytest.mark.asyncio async def test_handle_a2a_response_with_task_completed_and_no_update(self): - """Test successful A2A response handling with non-streeaming task and no update.""" + """Test successful A2A response handling with non-streaming task and no update.""" mock_a2a_task = Mock(spec=A2ATask) mock_a2a_task.id = "task-123" mock_a2a_task.context_id = "context-123" @@ -1149,7 +1149,7 @@ class TestRemoteA2aAgentMessageHandlingFromFactory: @pytest.mark.asyncio async def test_handle_a2a_response_with_task_completed_and_no_update(self): - """Test successful A2A response handling with non-streeaming task and no update.""" + """Test successful A2A response handling with non-streaming task and no update.""" mock_a2a_task = Mock(spec=A2ATask) mock_a2a_task.id = "task-123" mock_a2a_task.context_id = "context-123" diff --git a/tests/unittests/cli/test_fast_api.py b/tests/unittests/cli/test_fast_api.py index f4a84179..f0b6c89e 100755 --- a/tests/unittests/cli/test_fast_api.py +++ b/tests/unittests/cli/test_fast_api.py @@ -700,7 +700,7 @@ def test_update_session(test_app, create_test_session): def test_patch_session_not_found(test_app, test_session_info): - """Test patching a non-existent session.""" + """Test patching a nonexistent session.""" info = test_session_info url = f"/apps/{info['app_name']}/users/{info['user_id']}/sessions/nonexistent" diff --git a/tests/unittests/cli/utils/test_agent_loader.py b/tests/unittests/cli/utils/test_agent_loader.py index c3143296..5c66160a 100644 --- a/tests/unittests/cli/utils/test_agent_loader.py +++ b/tests/unittests/cli/utils/test_agent_loader.py @@ -731,7 +731,7 @@ class TestAgentLoader: loader = AgentLoader(str(regular_agents_dir)) - # Try to load non-existent special agent + # Try to load nonexistent special agent with pytest.raises(ValueError) as exc_info: loader.load_agent("__nonexistent_special") diff --git a/tests/unittests/code_executors/test_agent_engine_sandbox_code_executor.py b/tests/unittests/code_executors/test_agent_engine_sandbox_code_executor.py index c1bfd29a..64cca147 100644 --- a/tests/unittests/code_executors/test_agent_engine_sandbox_code_executor.py +++ b/tests/unittests/code_executors/test_agent_engine_sandbox_code_executor.py @@ -46,7 +46,7 @@ class TestAgentEngineSandboxCodeExecutor: """Tests that class attributes can be overridden at instantiation.""" with pytest.raises(ValueError): AgentEngineSandboxCodeExecutor( - sandbox_resource_name="projects/123/locations/us-central1/reasoningEgines/456/sandboxes/789", + sandbox_resource_name="projects/123/locations/us-central1/reasoningEngines/456/sandboxes/789", ) def test_init_with_agent_engine_overrides_throws_error(self): diff --git a/tests/unittests/evaluation/test_hallucinations_v1.py b/tests/unittests/evaluation/test_hallucinations_v1.py index 42953743..1aa119ef 100644 --- a/tests/unittests/evaluation/test_hallucinations_v1.py +++ b/tests/unittests/evaluation/test_hallucinations_v1.py @@ -105,7 +105,7 @@ class TestParseSentences: """Tests _parse_sentences method with sentences containing newlines.""" text_with_newlines = """This is a sentence with \n\nnewlines. -This sentence will not be parsed""" +This sentence won't be parsed because tag is misspelled""" assert _parse_sentences(text_with_newlines) == [ "This is a sentence with\n\n\nnewlines." ] diff --git a/tests/unittests/telemetry/test_functional.py b/tests/unittests/telemetry/test_functional.py index f3b29c54..409571ad 100644 --- a/tests/unittests/telemetry/test_functional.py +++ b/tests/unittests/telemetry/test_functional.py @@ -93,7 +93,7 @@ async def test_tracer_start_as_current_span( Additionally tests if each async generator invoked is wrapped in Aclosing. This is necessary because instrumentation utilizes contextvars, which ran into "ContextVar was created in a different Context" errors, - when a given coroutine gets indeterminitely suspended. + when a given coroutine gets indeterminately suspended. """ firstiter, finalizer = sys.get_asyncgen_hooks() diff --git a/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml b/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml index 1cc139a6..5ca9a2ce 100644 --- a/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml +++ b/tests/unittests/tools/openapi_tool/openapi_spec_parser/test.yaml @@ -634,7 +634,7 @@ components: requestId: description: |- The client-generated unique ID for this request. - Clients should regenerate this ID for every new request. If an ID provided is the same as for the previous request, the request is ignored. + Clients should regenerate this ID for every new request. If an ID provided is the same as the previous request, the request is ignored. type: string status: $ref: "#/components/schemas/ConferenceRequestStatus" diff --git a/tests/unittests/tools/test_base_google_credentials_manager.py b/tests/unittests/tools/test_base_google_credentials_manager.py index de568543..fb21af08 100644 --- a/tests/unittests/tools/test_base_google_credentials_manager.py +++ b/tests/unittests/tools/test_base_google_credentials_manager.py @@ -107,7 +107,7 @@ class TestGoogleCredentialsManager: """Test that existing non-oauth credentials are returned immediately. When credentials are of non-oauth type, no refresh or OAuth flow - is triggered irrespective of whether it is valid or not. + is triggered irrespective of whether or not it is valid. """ # Create mock credentials that are already valid mock_creds = Mock(spec=AuthCredentials)