示例#1
0
 def test_against_lower(self):
     sut = Comparison('5', '15', '>=')
     sut.evaluate({}, {})
     assert not sut.success
示例#2
0
 def test_against_greater(self):
     sut = Comparison('15', '5', '>=')
     sut.evaluate({}, {})
     assert sut.success
示例#3
0
 def test_against_equal(self):
     sut = Comparison('5', '5', '>')
     sut.evaluate({}, {})
     assert not sut.success
示例#4
0
 def test_equal(self):
     sut = Comparison('5', '5', '==')
     sut.evaluate({}, {})
     assert sut.success
示例#5
0
 def test_different_types_conmutative(self):
     sut = Comparison('"5"', '5', '==')
     sut.evaluate({}, {})
     assert sut.success
示例#6
0
 def test_to_string(self):
     sut = Comparison('5', '5', '>=')
     assert str(sut) == '5 >= 5'