Fix an issue with omited dedents in the parser.
This commit is contained in:
1 parent
e1c623d3f3
commit
dce952aec6
3 files changed
+53
-29
No files matched your search
@@ -242,6 +242,21 @@ def test_one_statement_func():
|
||||
cache.parser_cache.pop(None, None)
|
||||
check_fp(src + 'def second():\n a', 3)
|
||||
|
||||
|
||||
def test_class_func_if():
|
||||
src = dedent("""\
|
||||
class Class:
|
||||
def func(self):
|
||||
if 1:
|
||||
a
|
||||
else:
|
||||
b
|
||||
|
||||
pass
|
||||
""")
|
||||
check_fp(src, 3)
|
||||
|
||||
|
||||
def test_wrong_indentation():
|
||||
src = dedent("""\
|
||||
def func():
|
||||
|
||||
Reference in new issue
Block a user