Skip to content

Comments

Python: Improve Azure AI Search package test coverage#4019

Merged
TaoChenOSU merged 2 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-improve-azure-ai-search-test-coverage
Feb 17, 2026
Merged

Python: Improve Azure AI Search package test coverage#4019
TaoChenOSU merged 2 commits intomicrosoft:mainfrom
TaoChenOSU:taochen/python-improve-azure-ai-search-test-coverage

Conversation

@TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Feb 17, 2026

Motivation and Context

Closes #3354

Description

  1. Increase Azure AI Search unit test coverage to 97%
  2. Enforce coverage stay above 85%

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@TaoChenOSU TaoChenOSU self-assigned this Feb 17, 2026
Copilot AI review requested due to automatic review settings February 17, 2026 21:45
@github-actions github-actions bot changed the title Improve Azure AI Search package test coverage Python: Improve Azure AI Search package test coverage Feb 17, 2026
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 17, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
TOTAL20606298785% 
report-only-changed-files is enabled. No files were changed during this commit :)

Python Unit Test Overview

Tests Skipped Failures Errors Time
4087 225 💤 0 ❌ 0 🔥 1m 17s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@TaoChenOSU TaoChenOSU added this pull request to the merge queue Feb 17, 2026
Merged via the queue into microsoft:main with commit df58775 Feb 17, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Python: azure-ai-search package unit test coverage tracking

4 participants