summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pydoc.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2016-07-30 06:26:03 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2016-07-30 06:26:03 (GMT)
commitd78448e912126410117723c7d240bbdfff06df16 (patch)
tree73490ec91133beb78ecacda68510e3552b80e3b1 /Lib/test/test_pydoc.py
parentf6daa690e4ee8581e0e5aa87764c0562a16c9330 (diff)
downloadcpython-d78448e912126410117723c7d240bbdfff06df16.zip
cpython-d78448e912126410117723c7d240bbdfff06df16.tar.gz
cpython-d78448e912126410117723c7d240bbdfff06df16.tar.bz2
Issue #27366: Implement PEP 487
- __init_subclass__ called when new subclasses defined - __set_name__ called when descriptors are part of a class definition
Diffstat (limited to 'Lib/test/test_pydoc.py')
-rw-r--r--Lib/test/test_pydoc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_pydoc.py b/Lib/test/test_pydoc.py
index 889ce59..4998597 100644
--- a/Lib/test/test_pydoc.py
+++ b/Lib/test/test_pydoc.py
@@ -638,8 +638,9 @@ class PydocDocTest(unittest.TestCase):
del expected['__doc__']
del expected['__class__']
# inspect resolves descriptors on type into methods, but vars doesn't,
- # so we need to update __subclasshook__.
+ # so we need to update __subclasshook__ and __init_subclass__.
expected['__subclasshook__'] = TestClass.__subclasshook__
+ expected['__init_subclass__'] = TestClass.__init_subclass__
methods = pydoc.allmethods(TestClass)
self.assertDictEqual(methods, expected)