summaryrefslogtreecommitdiff
path: root/tests/test_pycode_parser.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-01 13:38:31 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-03 01:16:21 +0900
commit2ed26b437744da564e456ed2adc8d50eee3b5166 (patch)
treeee19d4910490dde37b3d91bdf38256df5f7c539a /tests/test_pycode_parser.py
parent5e4e44c19598aaeeda15422422cf5eec8136a9ea (diff)
downloadsphinx-git-2ed26b437744da564e456ed2adc8d50eee3b5166.tar.gz
pycode: Support type annotations for variables
Diffstat (limited to 'tests/test_pycode_parser.py')
-rw-r--r--tests/test_pycode_parser.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test_pycode_parser.py b/tests/test_pycode_parser.py
index b8bece84e..6cc18bcb6 100644
--- a/tests/test_pycode_parser.py
+++ b/tests/test_pycode_parser.py
@@ -105,6 +105,9 @@ def test_annotated_assignment_py36():
assert parser.comments == {('', 'a'): 'comment',
('', 'b'): 'string on next line',
('', 'c'): 'comment'}
+ assert parser.annotations == {('', 'a'): 'str',
+ ('', 'b'): 'int',
+ ('', 'c'): 'int'}
assert parser.definitions == {}