def test_lemongraph_not_connected(prebuilt_graph: Graph): connected, starting_edges = prebuilt_graph.connected( 'GCTGGATACGT', 'CGTCCGGACGT') if connected: raise GraphException(prebuilt_graph) else: assert True assert len(starting_edges) == 0
def test_lemongraph_connected_distant(prebuilt_graph: Graph): connected, starting_edges = prebuilt_graph.connected( 'ATACGACGCCA', 'CGTCCGGACGT') if not connected: raise GraphException(prebuilt_graph) else: assert True assert len(starting_edges) == 1 log.debug("Found starting_edges as {}".format(starting_edges[0]))
def test_graph_connected_no_node(g: Graph): _setup_connected_no_node(g) connected, starting_edges = g.connected('ABC', 'BCD') if connected: raise GraphException(g) else: assert True assert len(starting_edges) == 0
def test_graph_connected(g: Graph): _setup_connected(g) connected, starting_edges = g.connected('ABC', 'BCD') if not connected: raise GraphException(g) else: assert True assert len(starting_edges) == 1 log.debug("Found starting_edges as {}".format(starting_edges[0]))
def test_graph_connected_shortcut(g: Graph): _setup_connected_shortcut(g) connected, starting_edges = g.connected('ABC', 'CDE') if not connected: raise GraphException(g) else: assert True assert len(starting_edges) == 2 log.debug("Found starting_edges as:") for e in starting_edges: log.debug(e)