File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -230,16 +230,17 @@ def test_get_labels_returns_list(client):
230230def 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
245246def test_get_edge_types_returns_list (client ):
You can’t perform that action at this time.
0 commit comments