Closes #617: Fix docstring preparation without included signature: only ignore indentation of one line, not two.

This commit is contained in:
Jonathan Waltman
2012-09-16 01:08:47 -05:00
parent ead356e3cf
commit bf362e9ccb
3 changed files with 17 additions and 3 deletions

View File

@@ -518,6 +518,12 @@ def test_generate():
'test_autodoc.DocstringSig.meth')
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