comparison 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
comparison
equal deleted inserted replaced
247:55337021fe5b 248:5dd710b167d2
98 diff = difflib.unified_diff(expected_lines, output_lines, 98 diff = difflib.unified_diff(expected_lines, output_lines,
99 "expected", "found") 99 "expected", "found")
100 raise self.failureException("\n" + "".join(diff)) 100 raise self.failureException("\n" + "".join(diff))
101 101
102 102
103 class TestListPackagesNoPackages(ListPackagesTest):
104
105 track_files = []
106
107 def test_listpackages_noargs(self):
108 # if nothing has been packaged yet, the output is simply empty
109 self.check_cmd(["--source"], "")
110
111 def test_listpackages_revision(self):
112 # if nothing has been packaged yet, the output is simply empty
113 self.assertEquals(self.run_command(["--source", "--revision=12345",
114 "--track=kdepim"],
115 expected_exit_code=1),
116 "No revision 12345\n")
117
118 def test_listpackages_revision_rulesrev(self):
119 # if nothing has been packaged yet, the output is simply empty
120 self.assertEquals(self.run_command(["--source", "--revision=12345-321",
121 "--track=kdepim"],
122 expected_exit_code=1),
123 "No revision 12345-321\n")
124
103 class TestListPackagesTrackNoRevision(ListPackagesTest): 125 class TestListPackagesTrackNoRevision(ListPackagesTest):
104 126
105 track_files = [package_track_files("kdepim", "1.0.1", 127 track_files = [package_track_files("kdepim", "1.0.1",
106 ["kdepim", "kleopatra"], 128 ["kdepim", "kleopatra"],
107 [(704195, 31), (702432, 47)])] 129 [(704195, 31), (702432, 47)])]
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)