Add tests for predicate_id
@@ -133,3 +133,14 @@ def test_get_predecessors(graph, node, second_node):
def test_is_artificial():
node = ProgramGraphNode(index=42, is_artificial=True)
assert node.is_artificial
+
+
+def test_predicate_id_none():
+ node = ProgramGraphNode(index=42)
+ assert node.predicate_id is None
+
+
+def test_predicate_id_set():
+ node = ProgramGraphNode(index=42)
+ node.predicate_id = 1337
+ assert node.predicate_id == 1337
