g1 = Variable(TypeVariable.OUTPUT) g2 = Variable(TypeVariable.OUTPUT) g3 = Variable(TypeVariable.OUTPUT) # """ test of contradictions """ # test = Condition(Side(a), Side(), StateConditions.IS_ZERO) # test2 = Condition(Side(a), Side(), StateConditions.IS_NOT_ZERO) # assert test.is_contradiction(test2) # test = Condition(Side(a, a2, g3), Side(), StateConditions.IS_ZERO) # test2 = Condition(Side(a, a2, g3), Side(), StateConditions.IS_NOT_ZERO) # assert test.is_contradiction(test2) """ test of useless """ test = Condition(Side(), Side(), StateConditions.IS_ZERO) assert test.is_useless() test = Condition(Side(a, g3), Side(g3, a), StateConditions.IS_EQUAL) assert test.is_useless() test = Condition(Side(a, g3), Side(a, g3), StateConditions.IS_EQUAL) assert test.is_useless() test = Condition(Side(a, g3), Side(), StateConditions.IS_ZERO) assert test.is_useless() == False """ test of normalise """ test = Condition(Side(a, g3), Side(), StateConditions.IS_EQUAL) test2 = Condition(Side(g3), Side(a), StateConditions.IS_EQUAL) test.normalise() assert test == test2