'Test domain for geo_mean'

def test_geo_mean(self):

    dom = geo_mean(self.x).domain
    prob = Problem(Minimize(sum_entries(self.x)), dom)
    prob.solve()
    self.assertAlmostEqual(prob.value, 0)
    dom = geo_mean(self.x, [0, 2]).domain
    dom.append((self.x >= (-1)))
    prob = Problem(Minimize(sum_entries(self.x)), dom)
    prob.solve()
    self.assertItemsAlmostEqual(self.x.value, [(-1), 0])
    dom = geo_mean(self.z, [0, 1, 1]).domain
    dom.append((self.z >= (-1)))
    prob = Problem(Minimize(sum_entries(self.z)), dom)
    prob.solve()
    self.assertItemsAlmostEqual(self.z.value, [(-1), 0, 0])
