Fix the last IndentationError.

This commit is contained in:
Dave Halter
2017-07-19 22:15:20 +02:00
parent d52c8651d7
commit 944fe5a896
3 changed files with 9 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ True and False
if 1:
pass
# Syntax Error, no indentation
#: E901+1
#: E903+1
if 1:
pass
#: E223:8

View File

@@ -48,6 +48,7 @@ def test_syntax_errors(code, positions):
(' 1', [(1, 0)]),
('def x():\n 1\n 2', [(3, 0)]),
('def x():\n 1\n 2', [(3, 0)]),
('def x():\n1', [(2, 0)]),
]
)
def test_indentation_errors(code, positions):
@@ -63,6 +64,7 @@ def test_indentation_errors(code, positions):
' foo',
'def x():\n 1\n 2',
'def x():\n 1\n 2',
'if 1:\nfoo',
]
)
def test_python_exception_matches(code):