Python: Improved AzureAI Package Test Coverage#3452
Merged
giles17 merged 5 commits intomicrosoft:mainfrom Jan 29, 2026
Merged
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull request overview
Increases unit test coverage for the python/packages/azure-ai package by adding new tests around shared conversion utilities and client/provider behaviors (notably MCP tooling and Azure Monitor configuration).
Changes:
- Added a new
test_shared.pysuite covering_shared.pyconversion helpers (tools, response_format, MCP config). - Expanded tests for
AzureAIClient.configure_azure_monitorand MCP tool preparation logic. - Added coverage for provider/tool merging and additional Azure AI agent client edge cases.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| python/packages/azure-ai/tests/test_shared.py | New tests for _shared conversion functions (tools, MCP, response format). |
| python/packages/azure-ai/tests/test_provider.py | Adds a test ensuring tool-merge behavior skips dict function tools while preserving hosted tools. |
| python/packages/azure-ai/tests/test_azure_ai_client.py | Adds tests for Azure Monitor configuration paths and MCP tool preparation. |
| python/packages/azure-ai/tests/test_azure_ai_agent_client.py | Adds tests for response_format handling, tool resources, MCP resources, message preparation, and tool preparation. |
| python/packages/azure-ai/tests/test_agent_provider.py | Adds tests validating dict-format function tools require implementations and related integration-test import refactors. |
moonbox3
approved these changes
Jan 28, 2026
TaoChenOSU
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Increases unit test coverage for the
azure-aipackage from 76% to 91%, exceeding the 85% target.Resolves #3353
Description
Contribution Checklist