from plesna.graph import Edge, Graph, Node def test_init(): nodeA = Node(name="A") nodeB = Node(name="B") nodeC = Node(name="C") edge1 = Edge(arrow_name="arrow", source=nodeA, target=nodeC) edge2 = Edge(arrow_name="arrow", source=nodeB, target=nodeC) graph = Graph() graph.append(edge1) graph.append(edge2) assert graph.nodes == {nodeA, nodeB, nodeC}