summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2010-11-20 16:58:30 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2010-11-20 16:58:30 (GMT)
commit35184edd3d5748db2a0a5bf0d41ffa04b84a7fa3 (patch)
tree15bd819957745b851bcabfee50d4a138c17bafec /Lib/test/test_inspect.py
parente516265bbc75e4bb7fc2ab6eaeb7ad3aef86a938 (diff)
downloadcpython-35184edd3d5748db2a0a5bf0d41ffa04b84a7fa3.zip
cpython-35184edd3d5748db2a0a5bf0d41ffa04b84a7fa3.tar.gz
cpython-35184edd3d5748db2a0a5bf0d41ffa04b84a7fa3.tar.bz2
Issue 9732: __class__ no longer checked on objects by getattr_static
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index b3e131c..df480b8 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -860,11 +860,15 @@ class TestGetattrStatic(unittest.TestCase):
foo = 3
class Something(Base):
+ executed = False
@property
def __class__(self):
+ self.executed = True
return object
- self.assertEqual(inspect.getattr_static(Something(), 'foo'), 3)
+ instance = Something()
+ self.assertEqual(inspect.getattr_static(instance, 'foo'), 3)
+ self.assertFalse(instance.executed)
self.assertEqual(inspect.getattr_static(Something, 'foo'), 3)
def test_mro_as_property(self):