X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=tests%2Ftest_regexes.py;h=bde17275acd2c2509a3107254cbfc977880abaad;hb=7c5adcf962fe99d6a42307595f263f47d0112fbc;hp=8faf9a0aaf9ef85e082d6fa79d39fcb7256b2e45;hpb=25417639c3b647c2a2ad20cdfb2f00bdf24552e9;p=dak.git diff --git a/tests/test_regexes.py b/tests/test_regexes.py index 8faf9a0a..bde17275 100755 --- a/tests/test_regexes.py +++ b/tests/test_regexes.py @@ -34,26 +34,46 @@ class re_parse_lintian(DakTestCase): def testBinary(self): self.assertEqual( - self.MATCH('W: pkgname: some-tag path/to/file').groups(), - ('W', 'pkgname', 'some-tag', 'path/to/file') + self.MATCH('W: pkgname: some-tag path/to/file').groupdict(), + { + 'level': 'W', + 'package': 'pkgname', + 'tag': 'some-tag', + 'description': 'path/to/file', + } ) def testBinaryNoDescription(self): self.assertEqual( - self.MATCH('W: pkgname: some-tag').groups(), - ('W', 'pkgname', 'some-tag', '') + self.MATCH('W: pkgname: some-tag').groupdict(), + { + 'level': 'W', + 'package': 'pkgname', + 'tag': 'some-tag', + 'description': '', + } ) def testSource(self): self.assertEqual( - self.MATCH('W: pkgname source: some-tag').groups(), - ('W', 'pkgname source', 'some-tag', '') + self.MATCH('W: pkgname source: some-tag').groupdict(), + { + 'level': 'W', + 'package': 'pkgname source', + 'tag': 'some-tag', + 'description': '', + } ) def testSourceNoDescription(self): self.assertEqual( - self.MATCH('W: pkgname source: some-tag path/to/file').groups(), - ('W', 'pkgname source', 'some-tag', 'path/to/file') + self.MATCH('W: pkgname source: some-tag path/to/file').groupdict(), + { + 'level': 'W', + 'package': 'pkgname source', + 'tag': 'some-tag', + 'description': 'path/to/file', + } ) if __name__ == '__main__':