3 from base_test import DakTestCase
7 from daklib.lintian import parse_lintian_output
9 class ParseLintianTestCase(DakTestCase):
10 def assertParse(self, output, expected):
12 list(parse_lintian_output(output)),
18 'W: pkgname: some-tag path/to/file',
19 [('W', 'pkgname', 'some-tag', 'path/to/file')],
22 self.assertParse('', [])
23 self.assertParse('\n\n', [])
24 self.assertParse('dummy error test', [])
26 def testBinaryNoDescription(self):
28 'W: pkgname: some-tag',
29 [('W', 'pkgname', 'some-tag', '')],
34 'W: pkgname source: some-tag',
35 [('W', 'pkgname source', 'some-tag', '')]
38 def testSourceNoDescription(self):
40 'W: pkgname source: some-tag path/to/file',
41 [('W', 'pkgname source', 'some-tag', 'path/to/file')]
44 if __name__ == '__main__':