'Test the value. If value is boolean, return it. If value is equality
relational (two objects are equal), return it with left-hand side
being equal to right-hand side. Otherwise, raise ValueError exception.'

def _test(self, elem):

    val = self.condition.xreplace(dict(elem))
    if (val in [True, False]):
        return val
    elif val.is_Equality:
        return (val.lhs == val.rhs)
    raise ValueError(('Undeciable    if    %s' % str(val)))
