Skip to content

FIX: strip the expected value in StartsWith under ignore_whitespace - #4534

Open
Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/starts-with-ignore-whitespace
Open

Manohar Paturi (ManoharPaturi) wants to merge 1 commit into
microsoft:mainfrom
ManoharPaturi:fix/starts-with-ignore-whitespace

Conversation

@ManoharPaturi

Copy link
Copy Markdown
Contributor

Description

Fixes #4529

StartsWith under ignore_whitespace now strips the expected value like Equals already does, so the flag means one thing across the literal matcher family and a criterion that only carries incidental surrounding whitespace can match instead of silently degrading to a permanent False verdict. Case sensitivity and ignore_whitespace false behavior are unchanged.

Tests and Documentation

The matcher table gains the padded value rows, and the previously pinned row that codified the asymmetry (a whitespace padded StartsWith value on padded text) now expects the same answer Equals gives. The new rows fail on main. The output matches scorer suite passes at 45 tests, the full score tree passes apart from four preexisting dispatch exhaustiveness failures that fail identically on main, and ruff check and format are clean.

No documentation change needed, so I did not run JupyText.

Copilot AI balanced review requested due to automatic review settings November 21, 2026 13:35

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StartsWith with ignore_whitespace keeps the expected value's whitespace, unlike Equals

2 participants