Check the case where multiple docstrings are defined

This commit is contained in:
Takafumi Arakaki
2013-02-24 20:58:43 +01:00
parent aad9c34db6
commit 7f00b9414e

View File

@@ -344,6 +344,16 @@ class TestDocstring(TestBase):
x""")
self.assertEqual(defs[0].raw_doc, 'Docstring of `x`.')
def test_multiple_docstrings(self):
defs = self.definition("""
def func():
'''Original docstring.'''
x = func
'''Docstring of `x`.'''
x""")
docs = [d.raw_doc for d in defs]
self.assertEqual(docs, ['Original docstring.', 'Docstring of `x`.'])
class TestFeature(TestBase):
def test_full_name(self):