diff test/test_packager.py @ 229:653a45adda50

Prepare for svn managed debian rules directories. So far, the directory names used for a particular revision were of the form <revision>-1 . Now the second number (which was always 1 up to now) will become the svn revision of the debian rules directory. As a first step towards that, the packager classes now support numbers other than 1 as the second number in the package directory name. Update the tests accordingly.
author Bernhard Herzog <bh@intevation.de>
date Tue, 13 Jan 2009 13:48:59 +0000
parents 230582ed7329
children e3cda08d2619
line wrap: on
line diff
--- a/test/test_packager.py	Fri Jan 09 21:13:51 2009 +0000
+++ b/test/test_packager.py	Tue Jan 13 13:48:59 2009 +0000
@@ -192,7 +192,7 @@
         if self.do_stop:
             writefile(self.instructions_file, "stop")
         if self.do_package:
-            return StoppingPackager(self, 1)
+            return StoppingPackager(self, 1, 0)
         else:
             return None
 
@@ -252,16 +252,17 @@
         # of revisions
         trackdir = self.create_files("track",
                                      [("pkg",
-                                       [("704195-1",
+                                       [("704195-0",
                                          [("status", ""),
                                           ("src", []),
                                           ("binary", [])]),
-                                        ("702432-1",
+                                        ("702432-2",
                                          [("status", ""),
                                           ("src", []),
                                           ("binary", [])])])])
         track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
-        self.assertEquals(track.get_revision_numbers(), [702432, 704195])
+        self.assertEquals(track.get_revision_numbers(),
+                          [(702432, 2), (704195, 0)])
 
 
 class TestRevisionPackager(unittest.TestCase, FileTestMixin):
@@ -269,7 +270,7 @@
     def test_list_source_files(self):
         trackdir = self.create_files("track",
                                      [("pkg",
-                                       [("704195-1",
+                                       [("704195-31",
                                          [("status",
                                            ("TreePackagerStatus 0.0\n"
                                             "status: binary_package_created\n"
@@ -284,8 +285,8 @@
                                           ("src", []),
                                           ("binary", [])])])])
         track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
-        revpkg = RevisionPackager(track, 704195)
-        srcdir = os.path.join(trackdir, "pkg", "704195-1", "src")
+        revpkg = RevisionPackager(track, 704195, 31)
+        srcdir = os.path.join(trackdir, "pkg", "704195-31", "src")
         self.assertEquals(revpkg.list_source_files(),
                           [os.path.join(srcdir, filename)
                            for filename in ["test_1.0-1.diff.gz",
@@ -310,7 +311,7 @@
                                           ("src", []),
                                           ("binary", [])])])])
         track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
-        revpkg = RevisionPackager(track, 704195)
+        revpkg = RevisionPackager(track, 704195, 1)
         bindir = os.path.join(trackdir, "pkg", "704195-1", "binary")
         self.assertEquals(revpkg.list_binary_files(),
                           [os.path.join(bindir, filename)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)