mirror of
https://github.com/python/cpython.git
synced 2026-02-13 19:04:37 +00:00
check type_getattro for correctness in a descriptor corner case
This commit is contained in:
parent
5749d88243
commit
42d5947ef5
1 changed files with 9 additions and 0 deletions
|
|
@ -4516,6 +4516,15 @@ class X(object):
|
|||
x.a = 42
|
||||
self.assertEqual(x.a, 42)
|
||||
|
||||
# Also check type_getattro for correctness.
|
||||
class Meta(type):
|
||||
pass
|
||||
class X(object):
|
||||
__metaclass__ = Meta
|
||||
X.a = 42
|
||||
Meta.a = Descr("a")
|
||||
self.assertEqual(X.a, 42)
|
||||
|
||||
def test_getattr_hooks(self):
|
||||
# issue 4230
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue