mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-06 12:54:29 +08:00
Fix tokenizer: Form feeds and multiline docstrings didn't work together
This commit is contained in:
@@ -299,3 +299,11 @@ def test_brackets_no_indentation():
|
||||
""")
|
||||
lst = _get_token_list(code)
|
||||
assert [t.type for t in lst] == [OP, NEWLINE, OP, OP, NEWLINE, ENDMARKER]
|
||||
|
||||
|
||||
def test_form_feed():
|
||||
error_token, endmarker = _get_token_list(dedent('''\
|
||||
\f"""'''))
|
||||
assert error_token.prefix == '\f'
|
||||
assert error_token.string == '"""'
|
||||
assert endmarker.prefix == ''
|
||||
|
||||
Reference in New Issue
Block a user