'Test partial optimize with parameters.'

def test_partial_optimize_params(self):

    (x, y) = (Variable(1), Variable(1))
    gamma = Parameter()
    p1 = Problem(Minimize((x + y)), [((x + y) >= gamma), (y >= 4), (x >= 5)])
    gamma.value = 3
    p1.solve()
    p2 = Problem(Minimize(y), [((x + y) >= gamma), (y >= 4)])
    g = cvxpy.partial_optimize(p2, [y], [x])
    p3 = Problem(Minimize((x + g)), [(x >= 5)])
    p3.solve()
    self.assertAlmostEqual(p1.value, p3.value)
