Exemplo n.º 1
0
def test_get_networkx_graph():
    c1 = Component("c1")
    c2 = Component("c2")
    c3 = Component("c3")
    c2.parent_component_list = [c1]
    c2.child_component_list = [c3]
    product = Product([c3, c2, c1])
    product.get_networkx_graph()
Exemplo n.º 2
0
def test_get_node_and_edge_trace_for_plotly_network():
    c1 = Component("c1")
    c2 = Component("c2")
    c3 = Component("c3")
    c2.parent_component_list = [c1]
    c2.child_component_list = [c3]
    product = Product([c3, c2, c1])
    node_trace, edge_trace = product.get_node_and_edge_trace_for_plotly_network()
Exemplo n.º 3
0
def test_draw_networkx(tmpdir):
    """test_draw_networkx."""
    c1 = Component("c1")
    c2 = Component("c2")
    c3 = Component("c3")
    c2.parent_component_list = [c1]
    c2.child_component_list = [c3]
    product = Product([c3, c2, c1])
    product.draw_networkx(save_fig_path=os.path.join(str(tmpdir), "test.png"))
Exemplo n.º 4
0
def test_draw_plotly_network():
    c1 = Component("c1")
    c2 = Component("c2")
    c3 = Component("c3")
    c2.parent_component_list = [c1]
    c2.child_component_list = [c3]
    product = Product([c3, c2, c1])
    product.draw_plotly_network(save_fig_path="test.png")
    if os.path.exists("test.png"):
        os.remove("test.png")