[clang] [libclang/python] Improve test coverage (PR #109846)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 24 13:24:48 PDT 2024


================
@@ -46,6 +46,8 @@ def test_diagnostic_fixit(self):
         self.assertEqual(tu.diagnostics[0].location.column, 26)
         self.assertRegex(tu.diagnostics[0].spelling, "use of GNU old-style.*")
         self.assertEqual(len(tu.diagnostics[0].fixits), 1)
+        with self.assertRaises(IndexError):
----------------
Endilll wrote:

Does this work like a try-except block? I find it a tad too clever Python code.

https://github.com/llvm/llvm-project/pull/109846


More information about the cfe-commits mailing list