get_annotation -> annotation (property).

This commit is contained in:
Dave Halter
2017-04-08 15:28:38 +02:00
parent 545cb26f78
commit ff82763e6b
3 changed files with 11 additions and 8 deletions

View File

@@ -58,9 +58,9 @@ class TestsFunctionAndLambdaParsing(object):
def test_annotation(self, node, expected):
expected_annotation = expected.get('annotation', None)
if expected_annotation is None:
assert node.get_annotation() is None
assert node.annotation is None
else:
assert node.get_annotation().value == expected_annotation
assert node.annotation.value == expected_annotation
def test_get_call_signature(self, node, expected):
assert node.get_call_signature() == expected['call_sig']