diff options
author | Jonathan Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
---|---|---|
committer | Jonathan Waltman <jonathan.waltman@gmail.com> | 2012-09-16 01:08:47 -0500 |
commit | bf362e9ccbf03988116d1c55209ae17ec8c17117 (patch) | |
tree | e1e78977c44edfb3e4e8e1f1513f019cf68556a0 /tests/test_autodoc.py | |
parent | ead356e3cfa974e715ae4b9954b3ae5aee44b24c (diff) | |
download | sphinx-git-bf362e9ccbf03988116d1c55209ae17ec8c17117.tar.gz |
Closes #617: Fix docstring preparation without included signature: only ignore indentation of one line, not two.
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r-- | tests/test_autodoc.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 965064c37..6dedaad8f 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -519,6 +519,12 @@ def test_generate(): assert_result_contains( ' rest of docstring', 'method', 'test_autodoc.DocstringSig.meth') assert_result_contains( + '.. py:method:: DocstringSig.meth2()', 'method', + 'test_autodoc.DocstringSig.meth2') + assert_result_contains( + ' indented line', 'method', + 'test_autodoc.DocstringSig.meth2') + assert_result_contains( '.. py:classmethod:: Class.moore(a, e, f) -> happiness', 'method', 'test_autodoc.Class.moore') @@ -660,6 +666,13 @@ First line of docstring rest of docstring """ + def meth2(self): + """First line, no signature + Second line followed by indentation:: + + indented line + """ + class StrRepr(str): def __repr__(self): return self |