def test_full_rary_tree(self):
        r=2
        n=9
        t=full_rary_tree(r,n)
        assert_equal(t.order(),n)
        assert_true(is_connected(t))
        dh = degree_histogram(t)
        assert_equal(dh[0],0) # no nodes of 0
        assert_equal(dh[1],5) # nodes of degree 1 are leaves
        assert_equal(dh[r],1)  # root is degree r
        assert_equal(dh[r+1],9-5-1) # everyone else is degree r+1
        assert_equal(len(dh),r+2)
dataset/ETHPy150Open networkx/networkx/networkx/generators/tests/test_classic.py/TestGeneratorClassic.test_full_rary_tree/original