mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-43555: Report the column offset for invalid line continuation character (GH-24939)
This commit is contained in:
parent
123ff266cd
commit
96eeff5162
4 changed files with 13 additions and 6 deletions
|
@ -1162,6 +1162,11 @@ def func2():
|
|||
"""
|
||||
self._check_error(code, "expected ':'")
|
||||
|
||||
def test_invalid_line_continuation_error_position(self):
|
||||
self._check_error(r"a = 3 \ 4",
|
||||
"unexpected character after line continuation character",
|
||||
lineno=1, offset=9)
|
||||
|
||||
def test_invalid_line_continuation_left_recursive(self):
|
||||
# Check bpo-42218: SyntaxErrors following left-recursive rules
|
||||
# (t_primary_raw in this case) need to be tested explicitly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue