Mercurial > treepkg
diff test/test_packager.py @ 334:4c047e979ff4
Updated tests to reflect that Subversion revisions are now handled
as strings.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 08 Apr 2010 10:17:45 +0000 |
parents | 24db9223488b |
children | f06f707d9fda |
line wrap: on
line diff
--- a/test/test_packager.py Thu Apr 08 10:16:51 2010 +0000 +++ b/test/test_packager.py Thu Apr 08 10:17:45 2010 +0000 @@ -51,7 +51,7 @@ self.create_tarball(origtargz, self.work_dir, os.path.basename(pkgbasedir)) - changemsg = ("Update to SVN rev. %d" % (self.revision,)) + changemsg = ("Update to SVN rev. %s" % (self.revision,)) self.copy_debian_directory(pkgbasedir, pkgbaseversion, changemsg) @@ -128,16 +128,16 @@ version = track.last_changed_revision() # Now check the source and binary package files - pkgdir = os.path.join(self.trackdir, "pkg", "%d-0" % version) + pkgdir = os.path.join(self.trackdir, "pkg", "%s-0" % version) self.assertEquals(sorted(os.listdir(os.path.join(pkgdir, "src"))), [name % locals() for name in - ["testpkg_%(version)d-%(debrevision)s.diff.gz", - "testpkg_%(version)d-%(debrevision)s.dsc", - "testpkg_%(version)d.orig.tar.gz"]]) + ["testpkg_%(version)s-%(debrevision)s.diff.gz", + "testpkg_%(version)s-%(debrevision)s.dsc", + "testpkg_%(version)s.orig.tar.gz"]]) self.assertEquals(sorted(os.listdir(os.path.join(pkgdir, "binary"))), [name % locals() for name in - ["testpkg_%(version)d-%(debrevision)s_all.deb", - "testpkg_%(version)d-%(debrevision)s_i386.changes"]]) + ["testpkg_%(version)s-%(debrevision)s_all.deb", + "testpkg_%(version)s-%(debrevision)s_i386.changes"]]) class TestPackager(PackagerTest): @@ -151,7 +151,7 @@ self.runtest("treepkg1") def test_custom_pkg_revision_template(self): - self.runtest("kk1.2", pkg_revision_template="kk%(pkg_revision)d.2") + self.runtest("kk1.2", pkg_revision_template="kk%(pkg_revision)s.2") class TestPackagerWithMultipleRevisions(PackagerTest): @@ -168,7 +168,7 @@ def test_packaging_specific_revision(self): # Package the newest revision and then package an older one. self.runtest("treepkg1") - self.runtest("treepkg1", group_args=dict(revision=3)) + self.runtest("treepkg1", group_args=dict(revision='3')) class StoppingPackager(treepkg.packager.RevisionPackager):