mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-43859: Improve the error message for IndentationError exceptions (GH-25431)
This commit is contained in:
parent
b0544ba77c
commit
56c95dfe27
6 changed files with 2230 additions and 599 deletions
|
@ -179,7 +179,7 @@ class ExceptionTests(unittest.TestCase):
|
|||
|
||||
# should not apply to subclasses, see issue #31161
|
||||
s = '''if True:\nprint "No indent"'''
|
||||
ckmsg(s, "expected an indented block", IndentationError)
|
||||
ckmsg(s, "expected an indented block after 'if' statement on line 1", IndentationError)
|
||||
|
||||
s = '''if True:\n print()\n\texec "mixed tabs and spaces"'''
|
||||
ckmsg(s, "inconsistent use of tabs and spaces in indentation", TabError)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue