Skip to content

Commit b74f6eb

Browse files
committed
fix(tests): replace DETACH DELETE with two-step edge+node cleanup
DETACH DELETE may not reliably remove connected edges when nodes have relationships. Use explicit MATCH-DELETE for edges then nodes to ensure clean test isolation.
1 parent 27434ee commit b74f6eb

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/integration/test_sdk.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,11 @@ def test_create_edge_type_appears_in_get_edge_types(client):
541541
names = [et.name for et in edge_types]
542542
assert name in names, f"{name} not in {names}"
543543
finally:
544-
client.cypher("MATCH (n:VisibleEtNode {tag: $tag}) DETACH DELETE n", params={"tag": tag})
544+
client.cypher(
545+
"MATCH (n:VisibleEtNode {tag: $tag})-[r]-() DELETE r",
546+
params={"tag": tag},
547+
)
548+
client.cypher("MATCH (n:VisibleEtNode {tag: $tag}) DELETE n", params={"tag": tag})
545549

546550

547551
# ── Vector search ─────────────────────────────────────────────────────────────

0 commit comments

Comments
 (0)