-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Python: Improved AzureAI Package Test Coverage #3452
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Motivation and Context
Increases unit test coverage for the
azure-aipackage from 76% to 91%, exceeding the 85% target.Resolves #3353
Description
Contribution Checklist