mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.10] bpo-46091: Correctly calculate indentation levels for whitespace lines with continuation characters (GH-30130). (GH-30898)
(cherry picked from commit a0efc0c196)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
parent
4a57fa296b
commit
3fc8b74ace
5 changed files with 67 additions and 16 deletions
|
|
@ -1045,8 +1045,7 @@ def test_literal_eval_malformed_lineno(self):
|
|||
ast.literal_eval(node)
|
||||
|
||||
def test_literal_eval_syntax_errors(self):
|
||||
msg = "unexpected character after line continuation character"
|
||||
with self.assertRaisesRegex(SyntaxError, msg):
|
||||
with self.assertRaisesRegex(SyntaxError, "unexpected indent"):
|
||||
ast.literal_eval(r'''
|
||||
\
|
||||
(\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue