def test_against_lower(self): sut = Comparison('5', '15', '>=') sut.evaluate({}, {}) assert not sut.success
def test_against_greater(self): sut = Comparison('15', '5', '>=') sut.evaluate({}, {}) assert sut.success
def test_against_equal(self): sut = Comparison('5', '5', '>') sut.evaluate({}, {}) assert not sut.success
def test_equal(self): sut = Comparison('5', '5', '==') sut.evaluate({}, {}) assert sut.success
def test_different_types_conmutative(self): sut = Comparison('"5"', '5', '==') sut.evaluate({}, {}) assert sut.success
def test_to_string(self): sut = Comparison('5', '5', '>=') assert str(sut) == '5 >= 5'