def testDev(self): self.assertTrue(compareVersion("0.15", "0.15.0.dev4") > 0) self.assertTrue(compareVersion("0.15.dev5", "0.15.0.dev4") > 0) self.assertTrue(compareVersion("0.15.0rc1", "0.15.0rc1.dev4") > 0)
def testRegular(self): self.assertTrue(compareVersion("0.1", "0.1.0") == 0) self.assertTrue(compareVersion("0.2.0", "0.2") == 0) self.assertTrue(compareVersion("0.2", "0.1.0") > 0) self.assertTrue(compareVersion("0.2.1", "0.3") < 0)
def testRc(self): self.assertTrue(compareVersion("0.1rc1", "0.1") < 0) self.assertTrue(compareVersion("0.1.0rc1", "0.1") < 0) self.assertTrue(compareVersion("0.2.0rc1", "0.2rc1") == 0) self.assertTrue(compareVersion("0.2.0rc2", "0.2.0rc1") > 0) self.assertTrue(compareVersion("0.4.0", "0.4rc4") > 0)