Mercurial > treepkg
changeset 86:9bd92a3290e0
In TestPackageTrack, create the test files in the test_-methods so that
they can be defined on a test by test basis
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Tue, 11 Sep 2007 10:03:58 +0000 |
parents | 31b0567df051 |
children | 08d8ffd40f27 |
files | test/test_packager.py |
diffstat | 1 files changed, 13 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/test/test_packager.py Tue Sep 11 09:53:34 2007 +0000 +++ b/test/test_packager.py Tue Sep 11 10:03:58 2007 +0000 @@ -134,23 +134,22 @@ class TestPackageTrack(unittest.TestCase, FileTestMixin): - track_files = [("pkg", - [("704195-1", - [("status", ""), - ("src", []), - ("binary", [])]), - # Note: The revisions are not ordered so that we - # can check whether get_revision_numbers returns a - # sorted list of revisions - ("702432-1", - [("status", ""), - ("src", []), - ("binary", [])])])] - def setUp(self): self.trackdir = self.create_temp_dir(self.id() + "-track") - self.create_files(self.trackdir, self.track_files) def test_get_revision_numbers(self): + # Note: The revisions in the pkg dir are not ordered so that we + # can check whether get_revision_numbers returns a sorted list + # of revisions + self.create_files(self.trackdir, + [("pkg", + [("704195-1", + [("status", ""), + ("src", []), + ("binary", [])]), + ("702432-1", + [("status", ""), + ("src", []), + ("binary", [])])])]) track = PackageTrack("testtrack", self.trackdir, "", "", "", "", "") self.assertEquals(track.get_revision_numbers(), [702432, 704195])