Python: Improve Azure AI Search package test coverage#4019
Merged
TaoChenOSU merged 2 commits intomicrosoft:mainfrom Feb 17, 2026
Merged
Conversation
Member
Contributor
There was a problem hiding this comment.
Pull request overview
This PR significantly improves the test coverage for the Azure AI Search package, achieving 97% coverage and enforcing a minimum 85% threshold through CI. The changes address issue #3354 by adding comprehensive unit tests for previously untested functionality in the AzureAISearchContextProvider class.
Changes:
- Added extensive unit tests covering initialization, credential resolution, async context manager, vector field discovery, semantic search, agentic search, and document text extraction
- Enabled coverage enforcement for the azure-ai-search package in the CI pipeline to maintain quality standards
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/packages/azure-ai-search/tests/test_aisearch_context_provider.py | Added 880+ lines of comprehensive unit tests covering edge cases, error handling, and various configuration scenarios for the AzureAISearchContextProvider class |
| .github/workflows/python-check-coverage.py | Added azure-ai-search package to the enforced modules list, requiring it to maintain at least 85% test coverage in CI |
dmytrostruk
approved these changes
Feb 17, 2026
giles17
approved these changes
Feb 17, 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
Closes #3354
Description
Contribution Checklist