Beispiel #1
0
 def test_cmp_upstream_repo_pre(self):
     upstream_v = "0.6.0pre2"
     repo_vr = ("0.6.0", "0.4.pre2.fc11")
     repo_vr_older = ("0.5.9", "0.4.pre2.fc11")
     repo_vr_newer = ("0.6.0", "1.fc11")
     self.assertEqual(cmp_upstream_repo(upstream_v, repo_vr), 0)
     self.assertEqual(cmp_upstream_repo(upstream_v, repo_vr_older), 1)
     self.assertEqual(cmp_upstream_repo(upstream_v, repo_vr_newer), -1)
Beispiel #2
0
 def test_cmp_upstream_repo(self):
     self.assertEqual(cmp_upstream_repo("0.1.0", ("0.1.0", "5.fc10")), 0)
     self.assertEqual(cmp_upstream_repo("0.1.0", ("0.1.0", "")), 0)
     self.assertEqual(cmp_upstream_repo("0.1.1", ("0.1.0", "5.fc10")), 1)
     self.assertEqual(cmp_upstream_repo("0.1.0", ("0.2.0", "5.fc10")), -1)
Beispiel #3
0
 def rpm_diff(self):
     if not self._rpm_diff:
         self._rpm_diff = cmp_upstream_repo(self.latest_upstream,
                                            (self.repo_version,
                                             self.repo_release))
     return self._rpm_diff