예제 #1
0
 def __lt__(self, other):
     return NormalizedVersion(str(self)) < NormalizedVersion(str(other))
예제 #2
0
 def __eq__(self, other):
     return NormalizedVersion(str(self)) == NormalizedVersion(str(other))
예제 #3
0
 def __cmp__(self, other):
     return cmp(NormalizedVersion(str(self)), NormalizedVersion(str(other)))
예제 #4
0
    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))
예제 #5
0
    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))
예제 #6
0
def cmp_version(v1, v2):
    return cmp(NormalizedVersion(str(v1)), NormalizedVersion(str(v2)))