diff options
author | Georg Brandl <georg@python.org> | 2011-01-03 22:51:33 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2011-01-03 22:51:33 +0100 |
commit | 456faf0608a738c9c3163c887d517633deb6a413 (patch) | |
tree | 3650cc4c33802e011a0b1f7941fadf12e4ef8e62 /tests/test_autodoc.py | |
parent | c5f6cb5a2aeae8ff4ec2270800d12eccc8a99758 (diff) | |
download | sphinx-456faf0608a738c9c3163c887d517633deb6a413.tar.gz |
#564: Add :confval:`autodoc_docstring_signature` which retrieves the signature from the first line of the docstring, if it is found there.
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index d70fa260..74e69a68 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -492,6 +492,13 @@ def test_generate(): ], 'class', 'Class', member_order='bysource', all_members=True) + # test autodoc_docstring_signature + assert_result_contains( + '.. py:method:: DocstringSig.meth(FOO, BAR=1) -> BAZ', 'method', + 'test_autodoc.DocstringSig.meth') + assert_result_contains( + ' rest of docstring', 'method', 'test_autodoc.DocstringSig.meth') + # --- generate fodder ------------ @@ -582,3 +589,12 @@ class Outer(object): # should be documented as an alias factory = dict + + +class DocstringSig(object): + def meth(self): + """ + meth(FOO, BAR=1) -> BAZ + + rest of docstring + """ |