'Tests that the degree sequence of the generated graph matches
the input degree sequence.'

def test_degree_sequence(self):

    deg_seq = [5, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1]
    G = nx.configuration_model(deg_seq, seed=12345678)
    assert_equal(sorted((d for (n, d) in G.degree()), reverse=True), [5, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1])
    assert_equal(sorted((d for (n, d) in G.degree(range(len(deg_seq)))), reverse=True), [5, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1])
