def removeEmptylst_test(): G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) # try and remove an empty list G.remove_node(node=[]) exp = {'Alex', 'Julie', 'Rob', 'Ved', 'Michael', 'Mark', 'Jeff'} obs = G.nodes() assert_equal(exp, obs)
def removeNodeSet_test(): G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) # try to remove an empty set G.remove_node({}) exp = {'Alex', 'Julie', 'Rob', 'Ved', 'Michael', 'Mark', 'Jeff'} obs = G.nodes() assert_equal(exp, obs)
def removeEmptyStr_test(): # try to remove a node but user gives an empty string G = Graph() G.add_nodes_from(Friends) G.add_edges_from(Relationships) G.remove_node('') exp = {'Alex', 'Julie', 'Rob', 'Ved', 'Michael', 'Mark', 'Jeff'} obs = G.nodes() assert_equal(exp, obs)