def test_gte(self): self.assertEqual(False, _eval("3.5-ubuntu", ">=", "4")) self.assertEqual(True, _eval("4", ">=", "3.5-ubuntu")) self.assertEqual(True, _eval("4", ">=", "4"))
def test_lt(self): self.assertEqual(True, _eval("3.5-ubuntu", "<", "4")) self.assertEqual(False, _eval("4", "<", "3.5-ubuntu")) self.assertEqual(False, _eval("4", "<", "4")) # Epoch comes first self.assertEqual(True, _eval("1:2", "<", "2:1")) # ~'s self.assertEqual(True, _eval("1~~", "<", "1~~a")) self.assertEqual(True, _eval("1~~a", "<", "1~")) self.assertEqual(True, _eval("1~", "<", "1")) self.assertEqual(True, _eval("1", "<", "1a")) # debver's self.assertEqual(True, _eval("1-a~~", "<", "1-a~~a")) self.assertEqual(True, _eval("1-a~~a", "<", "1-a~")) self.assertEqual(True, _eval("1-a~", "<", "1-a")) self.assertEqual(True, _eval("1-a", "<", "1-aa")) # end-of-segment self.assertEqual(True, _eval("1a", "<", "1aa")) self.assertEqual(True, _eval("1a-a", "<", "1a-aa"))