mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Issue 27948: Allow backslashes in the literal string portion of f-strings, but not in the expressions. Also, require expressions to begin and end with literal curly braces.
This commit is contained in:
parent
052828db15
commit
451d0e38fc
9 changed files with 321 additions and 341 deletions
|
@ -285,12 +285,12 @@ class DirectoryTestCase(ASTTestCase):
|
|||
if test.support.verbose:
|
||||
print('Testing %s' % filename)
|
||||
|
||||
# it's very much a hack that I'm skipping these files, but
|
||||
# I can't figure out why they fail. I'll fix it when I
|
||||
# address issue #27948.
|
||||
if os.path.basename(filename) in ('test_fstring.py', 'test_traceback.py'):
|
||||
# Some f-strings are not correctly round-tripped by
|
||||
# Tools/parser/unparse.py. See issue 28002 for details.
|
||||
# We need to skip files that contain such f-strings.
|
||||
if os.path.basename(filename) in ('test_fstring.py', ):
|
||||
if test.support.verbose:
|
||||
print(f'Skipping {filename}: see issue 27921')
|
||||
print(f'Skipping {filename}: see issue 28002')
|
||||
continue
|
||||
|
||||
with self.subTest(filename=filename):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue