'Test the reshape class.'

def test_reshape(self):

    expr = reshape(self.A, 4, 1)
    self.assertEqual(expr.sign, s.UNKNOWN)
    self.assertEqual(expr.curvature, s.AFFINE)
    self.assertEqual(expr.size, (4, 1))
    expr = reshape(expr, 2, 2)
    self.assertEqual(expr.size, (2, 2))
    expr = reshape(square(self.x), 1, 2)
    self.assertEqual(expr.sign, s.POSITIVE)
    self.assertEqual(expr.curvature, s.CONVEX)
    self.assertEqual(expr.size, (1, 2))
    with self.assertRaises(Exception) as cm:
        reshape(self.C, 5, 4)
    self.assertEqual(str(cm.exception), 'Invalid    reshape    dimensions    (5,    4).')
