plesna/tests/graphs/test_graph_set.py

16 lines
411 B
Python
Raw Normal View History

from plesna.graph.graph_set import GraphSet
from plesna.models.graphs import EdgeOnSet, Node
2024-10-07 04:09:01 +00:00
def test_init():
graph_set = GraphSet()
2024-10-07 04:09:01 +00:00
nodeA = Node(name="A")
nodeB = Node(name="B")
nodeC = Node(name="C")
edge1 = EdgeOnSet(arrow="arrow", sources=[nodeA, nodeB], targets=[nodeC])
2024-10-07 04:09:01 +00:00
graph_set.append(edge1)
assert graph_set.node_sets == {frozenset([nodeA, nodeB]), frozenset([nodeC])}