Exemplo n.º 1
0
    def test_patch_info_bad_patch_type(self):
        with self.assertRaises(detools.Error) as cm:
            detools.patch_info_filename('tests/files/foo/bad-patch-type.patch')

        self.assertEqual(str(cm.exception), "Bad patch type 7.")
Exemplo n.º 2
0
    def test_patch_info_bad_empty_header(self):
        with self.assertRaises(detools.Error) as cm:
            detools.patch_info_filename('tests/files/empty/old')

        self.assertEqual(str(cm.exception), "Failed to read the patch header.")