def test_get_call_signature(code, call_signature): node = parse(code, version='3.5').children[0] if node.type == 'simple_stmt': node = node.children[0] assert parser_utils.get_call_signature(node) == call_signature assert parser_utils.get_doc_with_call_signature(node) == call_signature
def test_get_call_signature(code, call_signature): node = parse(code, version='3.5').children[0] if node.type == 'simple_stmt': node = node.children[0] assert parser_utils.get_call_signature(node) == call_signature assert parser_utils.get_doc_with_call_signature(node) == (call_signature + '\n\n')
def py__doc__(self, include_call_signature=False): try: self.tree_node.get_doc_node except AttributeError: return '' else: if include_call_signature: return get_doc_with_call_signature(self.tree_node) else: return clean_scope_docstring(self.tree_node) return None
def py__doc__(self, include_call_signature=False): try: self.tree_node.get_doc_node except AttributeError: return '' else: if include_call_signature: return get_doc_with_call_signature(self.tree_node) else: return clean_scope_docstring(self.tree_node) return None
def test_doc(self, node, expected): assert get_doc_with_call_signature(node) == (expected['call_sig'] + '\n\n')