def testGcc(self): self.assertEqual(up2dateUtils.isObsoleted(self.obs1, self.pkg1), 1)
def testGccCompat(self): self.assertEqual(up2dateUtils.isObsoleted(self.obsGcc, self.pkgGcc), 0)
def testOlderThanOrEqualObs(self): """Verify that a package with <= 1.0-1 does obsolete package 1.0-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs4, self.pkg2), 1)
def testAspell(self): self.assertEqual(up2dateUtils.isObsoleted(self.obsAspell, self.pkgAspell), 0)
def testOlderThanFail(self): """Verify that < 1.0-1 does not obsolete package 1.3-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs5, self.pkg5), 0)
def testOlderThanPass(self): """Verify that a pacakage with < 1.0-1 does obsolete package 0.9-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs5, self.pkg4), 1)
def testOlderThan(self): """Verify that a obs: < 1.0-1 does not obsolete 1.0-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs5, self.pkg2), 0)
def testNewerThanObsFails(self): """Verify that a package with >= 1.0-1 does obsolete package 1.3-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs6, self.pkg5), 1)
def testNewerThanObsWorks(self): """Verify that a package with >= 1.0-1 does obsolete package 0.9-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs6, self.pkg4), 0)
def testNewerThanObs(self): """Verify that a package with > 1.0-1 does not obsolete package 1.0-1""" self.assertEqual(up2dateUtils.isObsoleted(self.obs3, self.pkg2), 0)
def testAnyObs(self): """Verify that a package with no version sense obsolets all versions of the package it is obsoleting""" self.assertEqual(up2dateUtils.isObsoleted(self.obs2, self.pkg2), 1)