Skip to content

Comments

Python: Add more unit test coverage gates#4104

Merged
TaoChenOSU merged 2 commits intomainfrom
taochen/python-add-more-test-coverage-gate
Feb 19, 2026
Merged

Python: Add more unit test coverage gates#4104
TaoChenOSU merged 2 commits intomainfrom
taochen/python-add-more-test-coverage-gate

Conversation

@TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Feb 19, 2026

Motivation and Context

Enforce unit test coverage on more targets

Description

  1. Update the parsing script to handle files
  2. Enforce unit test coverage on more targets

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 19, 2026
Copilot AI review requested due to automatic review settings February 19, 2026 21:55
@github-actions github-actions bot changed the title Add more unit test coverage gates Python: Add more unit test coverage gates Feb 19, 2026
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Feb 19, 2026

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/core/agent_framework/_workflows
   _conversation_history.py12120%3, 5, 7, 14, 16–20, 23, 25–26
TOTAL21262331584% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
4189 240 💤 0 ❌ 0 🔥 1m 14s ⏱️

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 expands the Python coverage gate to enforce coverage thresholds on a broader set of “targets” (packages and optionally individual files), improving CI enforcement of unit test coverage across more of the Agent Framework Python surface area.

Changes:

  • Updated the Python coverage-checking script to support enforcing coverage for both package names and specific source file paths from a Cobertura XML report.
  • Expanded the enforced coverage target list to include additional subpackages and a specific module file.
  • Minor import reordering in _conversation_history.py.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
python/packages/core/agent_framework/_workflows/_conversation_history.py Moves imports above the module docstring (no functional behavior change).
.github/workflows/python-check-coverage.py Adds file-level coverage parsing and enforces coverage thresholds for additional package/file targets.

Copy link
Contributor

Copilot AI commented Feb 19, 2026

@TaoChenOSU I've opened a new pull request, #4106, to work on those changes. Once the pull request is ready, I'll request review from you.

…4106)

* Initial plan

* Update print_coverage_table docstring to document files parameter

Co-authored-by: TaoChenOSU <12570346+TaoChenOSU@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: TaoChenOSU <12570346+TaoChenOSU@users.noreply.github.com>
@TaoChenOSU TaoChenOSU added this pull request to the merge queue Feb 19, 2026
Merged via the queue into main with commit 20af5ad Feb 19, 2026
25 checks passed
@crickman crickman deleted the taochen/python-add-more-test-coverage-gate branch February 22, 2026 19:08
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.

5 participants