mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
bpo-37070: Cleanup fstring debug handling (GH-13607)
* Clean up some comments, fix potential memory leaks, clarify literal and expr_text.
This commit is contained in:
parent
0ae022c6a4
commit
f83d1dbd3b
2 changed files with 19 additions and 27 deletions
|
@ -284,6 +284,7 @@ class AnnotationsFutureTestCase(unittest.TestCase):
|
|||
eq("(x:=10)")
|
||||
eq("f'{(x:=10):=10}'")
|
||||
|
||||
def test_fstring_debug_annotations(self):
|
||||
# f-strings with '=' don't round trip very well, so set the expected
|
||||
# result explicitely.
|
||||
self.assertAnnotationEqual("f'{x=!r}'", expected="f'x={x!r}'")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue