MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / _ids

Method _ids

tests/unit/ast_cache_test.py:41–44  ·  view source on GitHub ↗
(self, source: str)

Source from the content-addressed store, hash-verified

39
40class TestChunkIds(unittest.TestCase):
41 def _ids(self, source: str) -> list:
42 tree = ast.parse(source)
43 seen: dict = {}
44 return [_make_chunk_id(n, seen) for n in tree.body]
45
46 def test_function(self):
47 self.assertEqual(self._ids("def foo(): pass"), ["FunctionDef:foo"])

Callers 6

test_functionMethod · 0.95
test_async_functionMethod · 0.95
test_classMethod · 0.95
test_bare_statementMethod · 0.95
test_mixedMethod · 0.95

Calls 1

_make_chunk_idFunction · 0.90

Tested by

no test coverage detected