comparison test/test_packager.py @ 85:31b0567df051

Make PackageTrack.get_revision_numbers return the revisions as a sorted list. Add a test case for this.
author Bernhard Herzog <bh@intevation.de>
date Tue, 11 Sep 2007 09:53:34 +0000
parents 98a7d70746a9
children 9bd92a3290e0
comparison
equal deleted inserted replaced
84:98a7d70746a9 85:31b0567df051
128 "testpkg_2-kk1.dsc", 128 "testpkg_2-kk1.dsc",
129 "testpkg_2.orig.tar.gz"]) 129 "testpkg_2.orig.tar.gz"])
130 self.assertEquals(sorted(os.listdir(os.path.join(pkgdir, "binary"))), 130 self.assertEquals(sorted(os.listdir(os.path.join(pkgdir, "binary"))),
131 ["testpkg_2-kk1_all.deb", 131 ["testpkg_2-kk1_all.deb",
132 "testpkg_2-kk1_i386.changes"]) 132 "testpkg_2-kk1_i386.changes"])
133
134
135 class TestPackageTrack(unittest.TestCase, FileTestMixin):
136
137 track_files = [("pkg",
138 [("704195-1",
139 [("status", ""),
140 ("src", []),
141 ("binary", [])]),
142 # Note: The revisions are not ordered so that we
143 # can check whether get_revision_numbers returns a
144 # sorted list of revisions
145 ("702432-1",
146 [("status", ""),
147 ("src", []),
148 ("binary", [])])])]
149
150 def setUp(self):
151 self.trackdir = self.create_temp_dir(self.id() + "-track")
152 self.create_files(self.trackdir, self.track_files)
153
154 def test_get_revision_numbers(self):
155 track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "")
156 self.assertEquals(track.get_revision_numbers(), [702432, 704195])
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)