summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-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):