MCPcopy Index your code
hub / github.com/python/cpython / parse_function

Method parse_function

Lib/test/test_clinic.py:1012–1018  ·  view source on GitHub ↗
(self, text, signatures_in_block=2, function_index=1)

Source from the content-addressed store, hash-verified

1010 return block
1011
1012 def parse_function(self, text, signatures_in_block=2, function_index=1):
1013 block = self.parse(text)
1014 s = block.signatures
1015 self.assertEqual(len(s), signatures_in_block)
1016 assert isinstance(s[0], Module)
1017 assert isinstance(s[function_index], Function)
1018 return s[function_index]
1019
1020 def expect_failure(self, block, err, *,
1021 filename=None, lineno=None, strip=True):

Calls 2

parseMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected