mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-120343: Do not reset byte_col_offset_diff after multiline tokens (#120352)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
This commit is contained in:
parent
32a0faba43
commit
1b62bcee94
3 changed files with 18 additions and 1 deletions
|
@ -1199,6 +1199,17 @@ async def f():
|
|||
NAME 'x' (1, 3) (1, 4)
|
||||
""")
|
||||
|
||||
def test_multiline_non_ascii_fstring(self):
|
||||
self.check_tokenize("""\
|
||||
a = f'''
|
||||
Autorzy, którzy tą jednostkę mają wpisani jako AKTUALNA -- czyli'''""", """\
|
||||
NAME 'a' (1, 0) (1, 1)
|
||||
OP '=' (1, 2) (1, 3)
|
||||
FSTRING_START "f\'\'\'" (1, 4) (1, 8)
|
||||
FSTRING_MIDDLE '\\n Autorzy, którzy tą jednostkę mają wpisani jako AKTUALNA -- czyli' (1, 8) (2, 68)
|
||||
FSTRING_END "\'\'\'" (2, 68) (2, 71)
|
||||
""")
|
||||
|
||||
class GenerateTokensTest(TokenizeTest):
|
||||
def check_tokenize(self, s, expected):
|
||||
# Format the tokens in s in a table format.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue