Skip to content

Python: Escape test-name pipes in integration trend reports - #9692

Closed
LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:fix/integration-report-pipes-20261026
Closed

LI (ktz03) wants to merge 1 commit into
microsoft:mainfrom
ktz03:fix/integration-report-pipes-20261026

Conversation

@ktz03

Copy link
Copy Markdown
Contributor

Motivation & Context

A pytest parameter ID such as a|b is written unescaped inside the integration trend report's test-name cell. GitHub Flavored Markdown treats the pipe as a column separator even inside a code span, so the displayed test name is split and the file, provider and result columns shift.

Description & Review Guide

  • What are the major changes? Escape pipes only in displayed short test names. Add six standard-library regression tests and run them explicitly in the existing Code Quality workflow.
  • What is the impact of these changes? Python and per-framework report tables retain one cell per test name. Test identifiers, history JSON, counts, status lookup and ordering remain unchanged.
  • What do you want reviewers to focus on? The regressions exercise the complete module with normal pytest-style and xunit-style XML fixtures plus the real CLI: four failures and two passing controls before the fix, all six passing afterward on Windows/Python 3.14.3. A separate local table-rendering check reuses real pytest 9.1.1 JUnit output and confirms the corrected cell contents and unchanged plain-name control. This is local validation; GitHub rendering, native .NET execution, full workspace tests, locked Ruff and official CI were not run.

Related Issue

N/A - trivial change. This corrects text escaping required by the existing table format (GFM tables, Example 200); it does not alter report data or introduce a new reporting policy.

AI Assistance

  • No material AI assistance was used.
  • This is an AI-assisted contribution. I reviewed, understood, and verified all submitted content and accept responsibility for it.

AI assistance details: Codex: implementation, regression tests, and this PR description.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR links to an agreed issue with no competing open PR, or the Related Issue section documents a trivial-change or repository-automation exception.
  • This is not a breaking change.

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.

🟢 Approval recommended

The localized display-only fix has focused regression coverage and no identified blocking issues; tests were not executed during this review.

No open issues 🎉

What changed in this PR

This PR fixes Markdown table alignment in integration trend reports by escaping pipes in displayed test names without changing stored identifiers or report data.

Changes:

  • Escape pipes in short test names for Python and per-framework report tables.
  • Add six regression tests covering formatting, unchanged history, and CLI output.
  • Run the regression tests in the existing Python Code Quality workflow.
File Description
python/​scripts/​integration_test_report/​tests/​test_trend_table.py Adds six formatting and data-preservation regression tests.
python/​scripts/​integration_test_report/​aggregate.py Escapes pipes in displayed short test names.
.github/​workflows/​python-code-quality.yml Runs the new tests through unittest discovery.

Review effort: Balanced

This branch was previously deployed

1 inactive deployment
github-app-auth — 46226c6d Deployed Oct 26, 2026 by ktz03 via team_check #7446
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

None yet

Development

Successfully merging this pull request may close these issues.

3 participants