summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorphilg314 <110174000+philg314@users.noreply.github.com>2022-09-08 11:12:14 (GMT)
committerGitHub <noreply@github.com>2022-09-08 11:12:14 (GMT)
commitb9634ac776c24bc4d4a57859d884a94cdfe16043 (patch)
treedd0c2eac6039e155a16e2e26f6352e1f1a1943e1 /Lib
parent3fedfcf19b86b4e95fd0b0fd089479ffad70e4c6 (diff)
downloadcpython-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.py5
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: