mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-10 15:51:51 +08:00
Check the case where multiple docstrings are defined
This commit is contained in:
@@ -344,6 +344,16 @@ class TestDocstring(TestBase):
|
|||||||
x""")
|
x""")
|
||||||
self.assertEqual(defs[0].raw_doc, 'Docstring of `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):
|
class TestFeature(TestBase):
|
||||||
def test_full_name(self):
|
def test_full_name(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user