plesna/tests/graphs/test_graph_set.py

16 lines
411 B
Python

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