'Tests for forbidding self-loops.'

def test_no_self_loops(self):

    n = 10
    k = 3
    G = random_uniform_k_out_graph(n, k, self_loops=False)
    assert_equal(G.number_of_selfloops(), 0)
    assert_true(all(((d == k) for (v, d) in G.out_degree())))
