comparison test/test_packager.py @ 222:01c043f13f13

Remove the unused PackageTrack.last_packaged_revision method and corresponding tests
author Bernhard Herzog <bh@intevation.de>
date Wed, 07 Jan 2009 19:57:46 +0000
parents e83db4482aab
children 230582ed7329
comparison
equal deleted inserted replaced
221:024b309c0520 222:01c043f13f13
1 # Copyright (C) 2007, 2008 by Intevation GmbH 1 # Copyright (C) 2007, 2008, 2009 by Intevation GmbH
2 # Authors: 2 # Authors:
3 # Bernhard Herzog <bh@intevation.de> 3 # Bernhard Herzog <bh@intevation.de>
4 # 4 #
5 # This program is free software under the GPL (>=v2) 5 # This program is free software under the GPL (>=v2)
6 # Read the file COPYING coming with the software for details. 6 # Read the file COPYING coming with the software for details.
262 [("status", ""), 262 [("status", ""),
263 ("src", []), 263 ("src", []),
264 ("binary", [])])])]) 264 ("binary", [])])])])
265 track = PackageTrack("testtrack", trackdir, "", "", "", "", "") 265 track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
266 self.assertEquals(track.get_revision_numbers(), [702432, 704195]) 266 self.assertEquals(track.get_revision_numbers(), [702432, 704195])
267
268 def test_last_packaged_revision_with_no_revisions(self):
269 trackdir = self.create_files("track", [("pkg", [])])
270 track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
271 self.assertEquals(track.last_packaged_revision(), -1)
272
273 def test_last_packaged_revision_several_revisions(self):
274 trackdir = self.create_files("track",
275 [("pkg",
276 [("704195-1",
277 [("status", ""),
278 ("src", []),
279 ("binary", [])]),
280 ("702432-1",
281 [("status", ""),
282 ("src", []),
283 ("binary", [])])])])
284 track = PackageTrack("testtrack", trackdir, "", "", "", "", "")
285 self.assertEquals(track.last_packaged_revision(), 704195)
286 267
287 268
288 class TestRevisionPackager(unittest.TestCase, FileTestMixin): 269 class TestRevisionPackager(unittest.TestCase, FileTestMixin):
289 270
290 # def setUp(self): 271 # def setUp(self):
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)