Skip to content

Commit bbeedf3

Browse files
committed
test(windows): request format=json in the non-ascii guard's query_graph calls
query_graph now defaults to TOON text; the guard's definition-count probe parsed it as JSON, swallowed the parse failure, and reported the ASCII baseline as having zero definitions (SETUP FAIL on the test-windows-guards leg). Scripted consumers use the format="json" escape hatch. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
1 parent 0fd175c commit bbeedf3

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎tests/windows/test_non_ascii_path.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,14 @@ def index_and_count(binary, repo, cache):
8888
out = {"name": p.get("name"), "nodes": p.get("nodes"),
8989
"edges": p.get("edges")}
9090
# Definition-level counts prove the parser ran (not just discovery).
91-
# query_graph returns {"columns":[...],"rows":[["<n>"]],...}.
91+
# query_graph defaults to TOON text; this scripted consumer requests
92+
# format="json" ({"columns":[...],"rows":[["<n>"]],...}) explicitly.
9293
name = p.get("name")
9394
defs = 0
9495
for label in ("Function", "Class", "Method"):
9596
q = "MATCH (n:%s) RETURN count(n)" % label
96-
r = s.call_tool("query_graph", {"query": q, "project": name},
97+
r = s.call_tool("query_graph",
98+
{"query": q, "project": name, "format": "json"},
9799
timeout=60)
98100
t, _ = s.tool_text(r)
99101
try:

0 commit comments

Comments
 (0)