mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
gh-132661: Implement PEP 750 (#132662)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Wingy <git@wingysam.xyz> Co-authored-by: Koudai Aono <koxudaxi@gmail.com> Co-authored-by: Dave Peck <davepeck@gmail.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Paul Everitt <pauleveritt@me.com> Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
5ea9010e89
commit
60202609a2
81 changed files with 7716 additions and 3761 deletions
|
@ -202,6 +202,15 @@ class UnparseTestCase(ASTTestCase):
|
|||
self.check_ast_roundtrip('f" something { my_dict["key"] } something else "')
|
||||
self.check_ast_roundtrip('f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}"')
|
||||
|
||||
def test_tstrings(self):
|
||||
self.check_ast_roundtrip("t'foo'")
|
||||
self.check_ast_roundtrip("t'foo {bar}'")
|
||||
self.check_ast_roundtrip("t'foo {bar!s:.2f}'")
|
||||
self.check_ast_roundtrip("t'foo {bar}' f'{bar}'")
|
||||
self.check_ast_roundtrip("f'{bar}' t'foo {bar}'")
|
||||
self.check_ast_roundtrip("t'foo {bar}' fr'\\hello {bar}'")
|
||||
self.check_ast_roundtrip("t'foo {bar}' u'bar'")
|
||||
|
||||
def test_strings(self):
|
||||
self.check_ast_roundtrip("u'foo'")
|
||||
self.check_ast_roundtrip("r'foo'")
|
||||
|
@ -918,7 +927,7 @@ class DirectoryTestCase(ASTTestCase):
|
|||
run_always_files = {"test_grammar.py", "test_syntax.py", "test_compile.py",
|
||||
"test_ast.py", "test_asdl_parser.py", "test_fstring.py",
|
||||
"test_patma.py", "test_type_alias.py", "test_type_params.py",
|
||||
"test_tokenize.py"}
|
||||
"test_tokenize.py", "test_tstring.py"}
|
||||
|
||||
_files_to_test = None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue