def __lt__(self, other): return NormalizedVersion(str(self)) < NormalizedVersion(str(other))
def __eq__(self, other): return NormalizedVersion(str(self)) == NormalizedVersion(str(other))
def __cmp__(self, other): return cmp(NormalizedVersion(str(self)), NormalizedVersion(str(other)))
def test_from_parts(self): for v, s in self.versions: v2 = V.from_parts(*v.parts) self.assertEquals(v, v2) self.assertEquals(str(v), str(v2))
def test_from_parts(self): for v, s in self.versions: v2 = V.from_parts(*v.parts) self.assertEqual(v, v2) self.assertEqual(str(v), str(v2))
def cmp_version(v1, v2): return cmp(NormalizedVersion(str(v1)), NormalizedVersion(str(v2)))