gh-154711: Add tests for comments after escaped quotes in f-strings and t-strings - #158220
Open
ArneshBanerjee wants to merge 1 commit into
Open
ArneshBanerjee wants to merge 1 commit into
ArneshBanerjee wants to merge 1 commit into
Conversation
…ings and t-strings Main is not affected by this bug after pythongh-153569, but nothing tested it. These tests cover a real comment placed after a string that ends with an escaped quote, in debug f-strings and in t-string interpolations.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds regression tests for gh-154711: a comment after a string that ends with an escaped quote must be stripped from debug f-string output and from t-string interpolation expressions.
Main is not affected after gh-153569, and 3.14 and 3.15 already have the fix from the gh-154719 backports, but none of the existing tests cover this case. The code fix for 3.13 is in #158310.
Tests only, so I think this needs
skip news.