summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2014-01-31 19:28:44 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2014-01-31 19:28:44 (GMT)
commit0860a0bd3f7859ca5786a9bb9b3c4b6c0e7a1f8d (patch)
treeb2fd10620c101f89a81ca06e7b72f6daff29bec3 /Lib/test/test_inspect.py
parent28479d8c7df55584ceb23041122cfbeb6073294e (diff)
downloadcpython-0860a0bd3f7859ca5786a9bb9b3c4b6c0e7a1f8d.zip
cpython-0860a0bd3f7859ca5786a9bb9b3c4b6c0e7a1f8d.tar.gz
cpython-0860a0bd3f7859ca5786a9bb9b3c4b6c0e7a1f8d.tar.bz2
inspect.classify_class_attrs: Classify object.__new__ and __init__ correctly #18801
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index f06b5b4..477f601 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -646,6 +646,10 @@ class TestClassesAndFunctions(unittest.TestCase):
md = _BrokenMethodDescriptor()
attrs = attrs_wo_objs(A)
+
+ self.assertIn(('__new__', 'method', object), attrs, 'missing __new__')
+ self.assertIn(('__init__', 'method', object), attrs, 'missing __init__')
+
self.assertIn(('s', 'static method', A), attrs, 'missing static method')
self.assertIn(('c', 'class method', A), attrs, 'missing class method')
self.assertIn(('p', 'property', A), attrs, 'missing property')