bpo-43555: Report the column offset for invalid line continuation character (GH-24939)
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 24233b2..730c297 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -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