예제 #1
0
def ClusteringCoefNodesDontExist_test():
    G = Graph()
    G.add_nodes_from(Friends)
    G.add_edges_from(Relationships)
    obs = G.clustering_coef(['Lexa', 'Roy', 'Demmi'])
    exp = {}
    assert_equal(exp, obs)
예제 #2
0
def clustCoefempty_test():
    G = Graph()
    G.add_nodes_from(Friends)
    G.add_edges_from(Relationships)
    # give an empty list
    obs = G.clustering_coef(node_list=[])
    exp = {}
    assert_equal(exp, obs)