summaryrefslogtreecommitdiff
path: root/tests/test_autodoc.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-03 22:52:25 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2019-06-03 23:20:33 +0900
commit81e2e1d97149e8a9993ae09a10a0f3caae88e7c4 (patch)
treea30929a63a14a92651905e9f93deea826f68a019 /tests/test_autodoc.py
parentf7851b62e0cb3c8284aa134af663469c0afaf480 (diff)
downloadsphinx-git-81e2e1d97149e8a9993ae09a10a0f3caae88e7c4.tar.gz
test: Update testcase for autoclass_content and autodoc_docstring_signature
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r--tests/test_autodoc.py33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py
index 07ffb2903..98f8f1a99 100644
--- a/tests/test_autodoc.py
+++ b/tests/test_autodoc.py
@@ -325,39 +325,6 @@ def test_get_doc():
"""Döcstring"""
assert getdocl('function', f) == ['Döcstring']
- # __init__ have signature at first line of docstring
- class E:
- """Class docstring"""
- def __init__(self, *args, **kw):
- """
- __init__(a1, a2, kw1=True, kw2=False)
-
- Init docstring
- """
-
- # signature line in the docstring will be kept when
- # autodoc_docstring_signature == False
- directive.env.config.autodoc_docstring_signature = False
- directive.env.config.autoclass_content = 'class'
- assert getdocl('class', E) == ['Class docstring']
- directive.env.config.autoclass_content = 'init'
- assert getdocl('class', E) == ['__init__(a1, a2, kw1=True, kw2=False)',
- '', 'Init docstring']
- directive.env.config.autoclass_content = 'both'
- assert getdocl('class', E) == ['Class docstring', '',
- '__init__(a1, a2, kw1=True, kw2=False)',
- '', 'Init docstring']
-
- # signature line in the docstring will be removed when
- # autodoc_docstring_signature == True
- directive.env.config.autodoc_docstring_signature = True # default
- directive.env.config.autoclass_content = 'class'
- assert getdocl('class', E) == ['Class docstring']
- directive.env.config.autoclass_content = 'init'
- assert getdocl('class', E) == ['Init docstring']
- directive.env.config.autoclass_content = 'both'
- assert getdocl('class', E) == ['Class docstring', '', 'Init docstring']
-
# verify that method docstrings get extracted in both normal case
# and in case of bound method posing as a function
class J: # NOQA