summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_fstring.py
diff options
context:
space:
mode:
authorLysandros Nikolaou <lisandrosnik@gmail.com>2020-04-29 00:43:50 (GMT)
committerGitHub <noreply@github.com>2020-04-29 00:43:50 (GMT)
commit37af21b667a9f41437b5b8e451497d7725016df5 (patch)
tree14dd65c5ff5287fda0e0b83d234734ed511469d6 /Lib/test/test_fstring.py
parentae00a5a88534fd45939f86c12e038da9fa6f9ed6 (diff)
downloadcpython-37af21b667a9f41437b5b8e451497d7725016df5.zip
cpython-37af21b667a9f41437b5b8e451497d7725016df5.tar.gz
cpython-37af21b667a9f41437b5b8e451497d7725016df5.tar.bz2
bpo-40334: Fix shifting of nested f-strings in the new parser (GH-19771)
`JoinedStr`s and `FormattedValue also needs to be shifted, in order to correctly compute the location information of nested f-strings.
Diffstat (limited to 'Lib/test/test_fstring.py')
-rw-r--r--Lib/test/test_fstring.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_fstring.py b/Lib/test/test_fstring.py
index 8cafbe8..4c240f3 100644
--- a/Lib/test/test_fstring.py
+++ b/Lib/test/test_fstring.py
@@ -207,8 +207,7 @@ f'{a * f"-{x()}-"}'"""
call = binop.right.values[1].value
self.assertEqual(type(call), ast.Call)
self.assertEqual(call.lineno, 3)
- if support.use_old_parser():
- self.assertEqual(call.col_offset, 11)
+ self.assertEqual(call.col_offset, 11)
def test_ast_line_numbers_duplicate_expression(self):
"""Duplicate expression