From 7f00b9414e8de60f6ababb22da240512cdd2bc26 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sun, 24 Feb 2013 20:58:43 +0100 Subject: [PATCH] Check the case where multiple docstrings are defined --- test/regression.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/regression.py b/test/regression.py index e52793b2..9933b4eb 100755 --- a/test/regression.py +++ b/test/regression.py @@ -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):