def test_get_vertex(): """Check if vertex can be retrieved from directed graph.""" g = DirectedGraph() g.add_vertex(vertex_props=None) v = g.get_vertex(vertex_id=0) assert v is not None assert v.id == 0
def test_get_vertex(): g = DirectedGraph() g.add_vertex(vertex_props=None) v = g.get_vertex(vertex_id=0) assert v is not None
def test_get_nonexistent_vertex(): """Check if non existent vertex can not be retrieved from directed graph.""" g = DirectedGraph() g.add_vertex(vertex_props=None) v = g.get_vertex(vertex_id=42) assert v is None