Mercurial > treepkg
diff test/test_listpackages.py @ 248:5dd710b167d2
Make bin/listpackages.py handle corner cases like no revisions built or
--revision referring to non-exisiting revisions better. Add tests for this.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Fri, 06 Mar 2009 19:57:04 +0000 |
parents | 59e2d8e26635 |
children | 243f206574cb |
line wrap: on
line diff
--- a/test/test_listpackages.py Fri Mar 06 19:22:53 2009 +0000 +++ b/test/test_listpackages.py Fri Mar 06 19:57:04 2009 +0000 @@ -100,6 +100,28 @@ raise self.failureException("\n" + "".join(diff)) +class TestListPackagesNoPackages(ListPackagesTest): + + track_files = [] + + def test_listpackages_noargs(self): + # if nothing has been packaged yet, the output is simply empty + self.check_cmd(["--source"], "") + + def test_listpackages_revision(self): + # if nothing has been packaged yet, the output is simply empty + self.assertEquals(self.run_command(["--source", "--revision=12345", + "--track=kdepim"], + expected_exit_code=1), + "No revision 12345\n") + + def test_listpackages_revision_rulesrev(self): + # if nothing has been packaged yet, the output is simply empty + self.assertEquals(self.run_command(["--source", "--revision=12345-321", + "--track=kdepim"], + expected_exit_code=1), + "No revision 12345-321\n") + class TestListPackagesTrackNoRevision(ListPackagesTest): track_files = [package_track_files("kdepim", "1.0.1",