[Treepkg-commits] r261 - trunk/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Apr 8 12:17:46 CEST 2010


Author: aheinecke
Date: 2010-04-08 12:17:45 +0200 (Thu, 08 Apr 2010)
New Revision: 261

Modified:
   trunk/test/test_packager.py
Log:
Updated tests to reflect that Subversion revisions are now handled
as strings.



Modified: trunk/test/test_packager.py
===================================================================
--- trunk/test/test_packager.py	2010-04-08 10:16:51 UTC (rev 260)
+++ trunk/test/test_packager.py	2010-04-08 10:17:45 UTC (rev 261)
@@ -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):



More information about the Treepkg-commits mailing list