diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-10 12:50:52 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-06-10 21:08:21 +0900 |
commit | 0edcae1ff875c64e7d011604df26fdb4a4dffca3 (patch) | |
tree | 0eb68670d6ade7a8e4492fa1a477f7c07153080f /tests/test_pycode_parser.py | |
parent | ac9f973c9be70c9f253a42939a73035be1e9e6aa (diff) | |
download | sphinx-git-0edcae1ff875c64e7d011604df26fdb4a4dffca3.tar.gz |
Fix #5019: autodoc: crashed by Form Feed Character
Diffstat (limited to 'tests/test_pycode_parser.py')
-rw-r--r-- | tests/test_pycode_parser.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_pycode_parser.py b/tests/test_pycode_parser.py index 29363e17e..0875329a4 100644 --- a/tests/test_pycode_parser.py +++ b/tests/test_pycode_parser.py @@ -315,3 +315,12 @@ def test_decorators(): 'func3': ('def', 7, 9), 'Foo': ('class', 11, 15), 'Foo.method': ('def', 13, 15)} + + +def test_formfeed_char(): + source = ('class Foo:\n' + '\f\n' + ' attr = 1234 #: comment\n') + parser = Parser(source) + parser.parse() + assert parser.comments == {('Foo', 'attr'): 'comment'} |