def populated_graph(): graph = sgraph.Sgraph() graph.dict = { 'a': ['b'], 'b': ['c', 'd'], 'c': ['b', 'a'], 'd': ['c'], 'e': [] } return graph
def depth_populated_graph(): graph = sgraph.Sgraph() graph.dict = { 'a': ['b', 'c', 'e'], 'b': ['d', 'f'], 'c': ['g'], 'd': [], 'e': [], 'f': ['e'], 'g': [] } return graph
def breadth_populated_graph(): graph = sgraph.Sgraph() graph.dict = { 'a': ['b', 'c'], 'b': ['d', 'e'], 'c': ['f', 'g'], 'd': [], 'e': ['h'], 'f': [], 'g': [], 'h': [], } return graph
def test___init__(): """Test instantiates simple graph with dictionary.""" assert sgraph.Sgraph().dict == {}
def empty_graph(): graph = sgraph.Sgraph() return graph