def test_multi_line(self): docstring = """This is a multiline docstring. This is the second line. """ result = 'This is a multiline docstring.\n\nThis is the second line.' self.assertEqual(docstring_dedent(docstring), result)
def test_single_line(self): self.assertEqual(docstring_dedent('docstring'), 'docstring')
def scope_info(self): """A list of scopes as named tuples, ready to be rendered.""" return [ Scope._make((handler.pattern, docstring_dedent(handler.__doc__))) for handler in HANDLERS]