Пример #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)))