MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / _partial_parse_fixture

Function _partial_parse_fixture

tests/test_partial_extraction_warning.py:28–38  ·  view source on GitHub ↗

A file the parser ACCEPTS only through ERROR recovery — an unclosed table constructor swallowing the function that follows it. Deliberately not the Kotlin one-line body from #2551: whether that shape trips the gate depends on the bundled grammar build, and these tests are about the

(tmp_path)

Source from the content-addressed store, hash-verified

26
27
28def _partial_parse_fixture(tmp_path):
29 """A file the parser ACCEPTS only through ERROR recovery — an unclosed table
30 constructor swallowing the function that follows it.
31
32 Deliberately not the Kotlin one-line body from #2551: whether that shape
33 trips the gate depends on the bundled grammar build, and these tests are
34 about the MESSAGE, which must read the same whichever grammar produced it.
35 """
36 f = tmp_path / "broken.lua"
37 f.write_text("local t = {\nfunction f() end\n", encoding="utf-8")
38 return f
39
40
41def _run(tmp_path, files, capsys):

Calls

no outgoing calls

Tested by

no test coverage detected