Skip to content

Commit b0ca81e

Browse files
committed
fix(test): normalize path separator in graph_edges query (closes #268)
1 parent d120ff6 commit b0ca81e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/test_issue231_async_handler_edges.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,11 @@ def _query_graph_edges(workspace, target_node_id=None, source_contains=None):
402402
conditions = []
403403
params = []
404404
if target_node_id is not None:
405-
conditions.append("target_id = ?")
406-
params.append(target_node_id)
405+
# backend.json node ids use the OS-native separator (backslash on
406+
# Windows); graph_edges stores target_id with forward slashes.
407+
# Normalize both sides so the match is cross-platform (issue #268).
408+
conditions.append("REPLACE(target_id, '\\', '/') = ?")
409+
params.append(target_node_id.replace("\\", "/"))
407410
if source_contains is not None:
408411
conditions.append("source_id LIKE ?")
409412
params.append(f"%{source_contains}%")

0 commit comments

Comments
 (0)