Skip to content

Python: Add more unit test coverage gates - #4104

Merged
Tao Chen (TaoChenOSU) merged 2 commits into
mainfrom
taochen/python-add-more-test-coverage-gate
Feb 19, 2026
Merged

Tao Chen (TaoChenOSU) merged 2 commits into
mainfrom
taochen/python-add-more-test-coverage-gate

Conversation

@TaoChenOSU

@TaoChenOSU Tao Chen (TaoChenOSU) commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

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 Tao Chen (TaoChenOSU) self-assigned this Feb 19, 2026
Copilot AI review requested due to automatic review settings February 19, 2026 21:55
@TaoChenOSU Tao Chen (TaoChenOSU) added the python Usage: [Issues, PRs], Target: Python label Feb 19, 2026
@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

Mark Wallace (markwallace-microsoft) commented Feb 19, 2026 •

Copy link
Copy Markdown
Contributor

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 ⏱️

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

Copilot AI commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Tao Chen (@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 <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: TaoChenOSU <[email protected]>
@TaoChenOSU
Tao Chen (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
Chris (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

python Usage: [Issues, PRs], Target: Python

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants