def test_missing_doc_empty_tooltip(): """When doc is missing, tooltip is missing""" G = nx.DiGraph() G.add_node(0, name="foo", task_ix=0, entity_name="buzz") dot = dagviz.dot_from_graph(G) # assert tooltip is missing assert not hasattr(get_pydot_attributes(0, dot), "tooltip")
def flow_dot(flow_graph): return dagviz.dot_from_graph(flow_graph)
def test_doc_propagated_to_tooltip(flow): """Check that docs are propagated to tooltips""" G = flow._deriver.export_dag(False) dot = dagviz.dot_from_graph(G) assert isinstance(dot, pydot.Dot) assert get_pydot_attributes(0, dot)["tooltip"] == "a friendly greeting"