mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
bpo-43555: Report the column offset for invalid line continuation character (GH-24939) (#24975)
(cherry picked from commit 96eeff5162
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
c145c03281
commit
994a519915
4 changed files with 13 additions and 6 deletions
|
@ -973,6 +973,11 @@ def func2():
|
|||
"""
|
||||
self._check_error(code, "invalid syntax")
|
||||
|
||||
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