diff options
author | philg314 <110174000+philg314@users.noreply.github.com> | 2022-09-08 11:12:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-08 11:12:14 (GMT) |
commit | b9634ac776c24bc4d4a57859d884a94cdfe16043 (patch) | |
tree | dd0c2eac6039e155a16e2e26f6352e1f1a1943e1 /Lib | |
parent | 3fedfcf19b86b4e95fd0b0fd089479ffad70e4c6 (diff) | |
download | cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.zip cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.tar.gz cpython-b9634ac776c24bc4d4a57859d884a94cdfe16043.tar.bz2 |
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (#96353)
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_exceptions.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index f8b0512..123bed6 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -2099,6 +2099,11 @@ class AttributeErrorTests(unittest.TestCase): except AttributeError as exc: self.assertEqual("bluch", exc.name) self.assertEqual(obj, exc.obj) + try: + object.__getattribute__(obj, "bluch") + except AttributeError as exc: + self.assertEqual("bluch", exc.name) + self.assertEqual(obj, exc.obj) def test_getattr_has_name_and_obj_for_method(self): class A: |