mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #6567: autodoc: autodoc_inherit_docstrings does not effect to __init__()
This commit is contained in:
@@ -62,6 +62,18 @@ def test_autoclass_content_class(app):
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' A class having both __init__ and __new__',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: G()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' A class inherits __init__ without docstring.',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: H()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' A class inherits __new__ without docstring.',
|
||||
' '
|
||||
]
|
||||
|
||||
@@ -110,6 +122,18 @@ def test_autoclass_content_init(app):
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' __init__ docstring',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: G()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' __init__ docstring',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: H()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' __new__ docstring',
|
||||
' '
|
||||
]
|
||||
|
||||
@@ -164,6 +188,22 @@ def test_autoclass_content_both(app):
|
||||
' A class having both __init__ and __new__',
|
||||
' ',
|
||||
' __init__ docstring',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: G()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' A class inherits __init__ without docstring.',
|
||||
' ',
|
||||
' __init__ docstring',
|
||||
' ',
|
||||
'',
|
||||
'.. py:class:: H()',
|
||||
' :module: target.autoclass_content',
|
||||
'',
|
||||
' A class inherits __new__ without docstring.',
|
||||
' ',
|
||||
' __new__ docstring',
|
||||
' '
|
||||
]
|
||||
|
||||
|
Reference in New Issue
Block a user