def METHOD_NAME(self):
    numpy.random.seed(1)
    mo = numpy.random.random(mf.mo_coeff.shape)
    ci0 = numpy.random.random((6,6))
    ci0/= numpy.linalg.norm(ci0)
    gall, gop, hop, hdiag = newton_casscf.gen_g_hop(mc, mo, ci0, mc.ao2mo(mo))
    self.assertAlmostEqual(lib.fp(gall), 21.288022525148595, 8)
    self.assertAlmostEqual(lib.fp(hdiag), -4.6864640132374618, 8)
    x = numpy.random.random(gall.size)
    u, ci1 = newton_casscf.extract_rotation(mc, x, 1, ci0)
    self.assertAlmostEqual(lib.fp(gop(u, ci1)), -412.9441873541524, 8)
    self.assertAlmostEqual(lib.fp(hop(x)), 73.358310983341198, 8)