Skip to content

Commit c9d0d27

Browse files
committed
test(integration): use unique label name in has_property_definitions test
Same stale-schema fix as adjacent tests: generate a unique label per run so accumulated schema state cannot produce a false assertion pass.
1 parent 0d7ce75 commit c9d0d27

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

tests/integration/test_sdk.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,17 @@ def test_get_labels_returns_list(client):
230230
def test_get_labels_has_property_definitions(client):
231231
"""LabelInfo.properties is a list (may be empty for schema-free labels)."""
232232
tag = uid()
233-
client.cypher("CREATE (n:PropLabel {tag: $tag})", params={"tag": tag})
233+
label_name = f"PropLabel{uid()}"
234+
client.cypher(f"CREATE (n:{label_name} {{tag: $tag}})", params={"tag": tag})
234235
try:
235236
labels = client.get_labels()
236-
found = next((lbl for lbl in labels if lbl.name == "PropLabel"), None)
237-
assert found is not None, "PropLabel not returned by get_labels()"
237+
found = next((lbl for lbl in labels if lbl.name == label_name), None)
238+
assert found is not None, f"{label_name} not returned by get_labels()"
238239
# Intentionally only check the type — CoordiNode is schema-free and may return
239240
# an empty properties list even when the node was created with properties.
240241
assert isinstance(found.properties, list)
241242
finally:
242-
client.cypher("MATCH (n:PropLabel {tag: $tag}) DETACH DELETE n", params={"tag": tag})
243+
client.cypher(f"MATCH (n:{label_name} {{tag: $tag}}) DETACH DELETE n", params={"tag": tag})
243244

244245

245246
def test_get_edge_types_returns_list(client):

0 commit comments

Comments
 (0)