8000 tests: Add unit tests for mcp_tool by pkduongsu · Pull Request #663 · google/adk-python · GitHub
[go: up one dir, main page]

Skip to content

tests: Add unit tests for mcp_tool #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

pkduongsu
Copy link
@pkduongsu pkduongsu commented May 10, 2025

#542

Hi @hangfei,

This commit adds tests for:
mcp_tool.py
mcp_toolset.py
conversion_utils.py
mcp_session_manager.py

Current test coverage:

Name                                                   Stmts   Miss  Cover
--------------------------------------------------------------------------
src\google\adk\tools\mcp_tool\conversion_utils.py         59      0   100%
src\google\adk\tools\mcp_tool\mcp_session_manager.py      55     23    58%
src\google\adk\tools\mcp_tool\mcp_tool.py                 47      5    89%
src\google\adk\tools\mcp_tool\mcp_toolset.py              53      6    89%
--------------------------------------------------------------------------

Copy link
google-cla bot commented May 10, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@ankursharmas ankursharmas requested a review from seanzhou1023 May 13, 2025 01:15
@pkduongsu pkduongsu reopened this May 15, 2025
@pkduongsu pkduongsu closed this May 15, 2025
@pkduongsu pkduongsu reopened this May 15, 2025
@pkduongsu pkduongsu requested a review from seanzhou1023 May 15, 2025 09:26
assert session_manager._exit_stack == mock_exit_stack
assert session_manager._errlog == mock_errlog

#Failing tests:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

@hangfei
Copy link
Collaborator
hangfei commented May 30, 2025

@pkduongsu MCP requires 3.10. So you need to update the test workflow file.

So we only run MCP with 3.10 + and run all other tests with 3.9+.

https://github.com/google/adk-python/blob/main/.github/workflows/python-unit-tests.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0