def removePartEdge_test(): G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) exp = G.edges() # remove an edge but give a single part of the edge G.remove_edge(['Alex']) obs = G.edges() assert_equal(exp, obs)
def addNoEdge_test(): G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) exp = G.edges() # remove an edge but give an empty list G.remove_edge([]) obs = G.edges() assert_equal(exp, obs)
def removeEdgeMorethan2_test(): G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) # remove an edge but give three entries G.remove_edge(['Alex', 'Julie', 'Michael']) exp = 21 obs = len(G.edges()) assert_equal(exp, obs)