'Asserts that expr is an Expression with dimension size.'

def assertExpression(self, expr, size):

    assert (isinstance(expr, Expression) or isinstance(expr, Constraint))
    self.assertEqual(expr.size, size)
