[clang] [libclang/python] Type-annotate SourceLocation and SourceRange (PR #180193)
Jannick Kremer via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 6 06:22:51 PST 2026
================
@@ -168,4 +168,4 @@ def test_equality(self):
self.assertEqual(location1, location1_2)
self.assertNotEqual(location1, location2)
self.assertNotEqual(location1, file2_location1)
- self.assertNotEqual(location1, "foo")
+ self.assertFalse(location1 == "foo")
----------------
DeinAlptraum wrote:
This was necessary to make the tests pass with the correctly implemented `__eq__` operators, because `unittest`'s `assertEqual` does not seem to handle `NotImplemented` correctly
https://github.com/llvm/llvm-project/pull/180193
More information about the cfe-commits
mailing list