def test_030_add_project(self): r = VersionsDB.Release("ReleaseA") r["Project1"] = "v1r0" r["Project2"] = "v2r0" r = VersionsDB.Release("ReleaseB", base="ReleaseA") r["Project2"] = "v2r1" r = VersionsDB.getRelease("ReleaseA") self.assertEquals(r["Project1"].version, "v1r0") self.assertEquals(r["Project2"].version, "v2r0") r = VersionsDB.getRelease("ReleaseB") self.assertEquals(r["Project1"].version, "v1r0") self.assertEquals(r["Project2"].version, "v2r1")
def test_410_sort_projects(self): self._prepareDBWithDeps() r = VersionsDB.getRelease("r1") projs = [p.name for p in r.allProjects()] self.assertEquals(projs, ['p1', 'p2', 'p4', 'p3', 'p5', 'p7', 'p6']) r = VersionsDB.getRelease("r2") projs = [p.name for p in r.allProjects()] self.assertEquals(projs, ['p1', 'z10', 'p2', 'p4', 'p3', 'p5', 'p7', 'p6']) projs = [p.name for p in r.values()] self.assertEquals(projs, ['z10', 'p5'])
def test_400_dependencies(self): self._prepareDBWithDeps() r = VersionsDB.getRelease("r1") deps = r.expandBuildTimeDeps("p6") deps.sort() self.assertEquals(deps, ["p1", "p3"]) deps = r.expandRunTimeDeps("p6") deps.sort() self.assertEquals(deps, ["p2", "p4", "p5"])
def test_010_create_release(self): ra = VersionsDB.Release("ReleaseA") rb = VersionsDB.Release("ReleaseB", base="ReleaseA") self.assertEqual(VersionsDB.getRelease("ReleaseA"), ra) self.assertEqual(VersionsDB.getRelease("ReleaseB"), rb) self.assertEquals(rb.base, "ReleaseA")
def test(self): # check content of db r = VersionsDB.getRelease("R1") self.assertEquals(r["p1"].tag, None) self.assertEquals(r["p2"].tag, "DC06")
def test(self): # check content of db r = VersionsDB.getRelease("R1") self.assertEquals(r.date, VersionsDB.DEFAULT_RELEASEDATE) r = VersionsDB.getRelease("R2") self.assertEquals(r.date, (2008, 5, 7))