Mercurial > treepkg
comparison test/test_packager.py @ 87:08d8ffd40f27
add some tests for the PackageTrack.last_packaged_revision() method
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 11 Sep 2007 10:05:15 +0000 |
parents | 9bd92a3290e0 |
children | 3ae54f99db26 |
comparison
equal
deleted
inserted
replaced
86:9bd92a3290e0 | 87:08d8ffd40f27 |
---|---|
151 [("status", ""), | 151 [("status", ""), |
152 ("src", []), | 152 ("src", []), |
153 ("binary", [])])])]) | 153 ("binary", [])])])]) |
154 track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "") | 154 track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "") |
155 self.assertEquals(track.get_revision_numbers(), [702432, 704195]) | 155 self.assertEquals(track.get_revision_numbers(), [702432, 704195]) |
156 | |
157 def test_last_packaged_revision_with_no_revisions(self): | |
158 self.create_files(self.trackdir, [("pkg", [])]) | |
159 track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "") | |
160 self.assertEquals(track.last_packaged_revision(), -1) | |
161 | |
162 def test_last_packaged_revision_several_revisions(self): | |
163 self.create_files(self.trackdir, | |
164 [("pkg", | |
165 [("704195-1", | |
166 [("status", ""), | |
167 ("src", []), | |
168 ("binary", [])]), | |
169 ("702432-1", | |
170 [("status", ""), | |
171 ("src", []), | |
172 ("binary", [])])])]) | |
173 track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "") | |
174 self.assertEquals(track.last_packaged_revision(), 704195) |