mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)
(cherry picked from commit b9634ac776
)
Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
This commit is contained in:
parent
0c443c2315
commit
99919d4e8a
3 changed files with 9 additions and 0 deletions
|
@ -2058,6 +2058,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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue