Beispiel #1
0
def test_append_to_docs():
    def foo():
        """some

        multiline
        docstring"""
        pass

    append_to_docs(foo, 'more random docs')
    assert foo.__doc__ == """some
Beispiel #2
0
def test_append_to_docs_undocumented():
    def foo():
        pass

    append_to_docs(foo, 'some documentation')
    assert foo.__doc__ == 'some documentation'