bpo-44063: set the missing end locations on the compiler (GH-25956) (#25972)
(cherry picked from commit b2ec37a7224318d466e0877790ed740ce8b4867d)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index 0a910bc..9799697 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -1422,6 +1422,13 @@ def case(x):
case(34)
"""
compile(code, "<string>", "exec")
+
+ def test_multiline_compiler_error_points_to_the_end(self):
+ self._check_error(
+ "call(\na=1,\na=1\n)",
+ "keyword argument repeated",
+ lineno=3
+ )
def test_main():