def test_start_with_space(self): def func(): """ Who does this?! """ assert get_docs(func) == ('Who does this?!', '')
def test_one_line_description(self): def func(): """Look, I'm writing Proper docstrings """ assert get_docs(func) == ("Look, I'm writing", "Proper docstrings")
def test_multiple_lines(self): def func(): """Look, I'm writing Proper docstrings """ assert get_docs(func) == ( "Look, I'm writing", """Proper docstrings""")
def test_no_doc(self): def func(): pass assert get_docs(func) == ('', '')
def test_just_summary(self): def func(): """One line docstring""" assert get_docs(func) == ('One line docstring', '')