mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-21 10:32:25 +08:00
Fix tokenizer: Form feeds and multiline docstrings didn't work together
This commit is contained in:
@@ -1016,20 +1016,20 @@ def test_special_no_newline_ending(differ):
|
||||
|
||||
def test_random_character_insertion(differ):
|
||||
code1 = dedent('''\
|
||||
def create(self):
|
||||
1
|
||||
if self.path is not None:
|
||||
return
|
||||
# 3
|
||||
# 4
|
||||
def create(self):
|
||||
1
|
||||
if self.path is not None:
|
||||
return
|
||||
# 3
|
||||
# 4
|
||||
''')
|
||||
code2 = dedent('''\
|
||||
def create(self):
|
||||
1
|
||||
if 2:
|
||||
x return
|
||||
# 3
|
||||
# 4
|
||||
def create(self):
|
||||
1
|
||||
if 2:
|
||||
x return
|
||||
# 3
|
||||
# 4
|
||||
''')
|
||||
differ.initialize(code1)
|
||||
differ.parse(code2, copies=1, parsers=3, expect_error_leaves=True)
|
||||
|
||||
Reference in New Issue
Block a user