Skip to content

test(tools): add unit tests for get_user_choice_tool#6207

Open
Koushik-Salammagari wants to merge 1 commit into
google:mainfrom
Koushik-Salammagari:test/get-user-choice-tool-coverage
Open

test(tools): add unit tests for get_user_choice_tool#6207
Koushik-Salammagari wants to merge 1 commit into
google:mainfrom
Koushik-Salammagari:test/get-user-choice-tool-coverage

Conversation

@Koushik-Salammagari

Copy link
Copy Markdown
Contributor

Link to Issue or Description of Change

Description of the change (no existing issue):

Problem:
The google.adk.tools.get_user_choice_tool module had no dedicated unit-test
coverage.

Solution:
Add a focused, test-only module. No production code is changed.

Coverage added:

  • get_user_choice — sets tool_context.actions.skip_summarization and
    returns None.
  • get_user_choice_tool — is a LongRunningFunctionTool (is_long_running
    is True) wrapping the get_user_choice function, with name
    get_user_choice.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.
$ pytest tests/unittests/tools/test_get_user_choice_tool.py -q
...
4 passed in 1.05s

Manual End-to-End (E2E) Tests:

Not applicable — this is a test-only change with no runtime/user-facing impact.

Checklist

  • I have read the CONTRIBUTING.md document.
  • 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.

Adds unit-test coverage for the previously untested get_user_choice_tool
module: that get_user_choice sets skip_summarization and returns None, and
that get_user_choice_tool is a LongRunningFunctionTool wrapping that function.
@adk-bot adk-bot added the tools [Component] This issue is related to tools label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tools [Component] This issue is related to tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants