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

Method test_empty_module

tests/unit/ast_cache_test.py:75–80  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

73 return _build_ast_json_and_chunks(tree, source, old or {})
74
75 def test_empty_module(self):
76 json_str, chunks = self._build("")
77 parsed = _parse_json(json_str)
78 self.assertEqual(parsed["node_type"], "Module")
79 self.assertEqual(parsed["fields"]["body"], [])
80 self.assertEqual(chunks, {})
81
82 def test_single_function_structure(self):
83 src = "def foo(x):\n return x + 1\n"

Callers

nothing calls this directly

Calls 2

_buildMethod · 0.95
_parse_jsonFunction · 0.85

Tested by

no test coverage detected