From be8e2be47b405723e39ff46e473829bcc8d17cb9 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Mon, 21 May 2018 00:24:15 +0900 Subject: Fix #4914: autodoc: Parsing error when using dataclasses without default values --- tests/test_pycode_parser.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/test_pycode_parser.py') diff --git a/tests/test_pycode_parser.py b/tests/test_pycode_parser.py index 09f1f41f5..29363e17e 100644 --- a/tests/test_pycode_parser.py +++ b/tests/test_pycode_parser.py @@ -100,11 +100,13 @@ def test_comment_picker_location(): def test_annotated_assignment_py36(): source = ('a: str = "Sphinx" #: comment\n' 'b: int = 1\n' - '"""string on next line"""') + '"""string on next line"""\n' + 'c: int #: comment') parser = Parser(source) parser.parse() assert parser.comments == {('', 'a'): 'comment', - ('', 'b'): 'string on next line'} + ('', 'b'): 'string on next line', + ('', 'c'): 'comment'} assert parser.definitions == {} -- cgit v1.2.1