Skip to content

Commit

Permalink
Exhaustive testing for docstring additions
Browse files Browse the repository at this point in the history
Just because I'm now at 100% coverage of my added code in this PR!
  • Loading branch information
rwb27 committed Jul 22, 2021
1 parent 001d6bb commit 704cba9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ def class_method(self):
"""
return self

def class_method_oneline(self):
"""One line docstring.
"""
return self

def class_method_no_docstring(self):
return self

Expand All @@ -42,6 +47,10 @@ def test_get_docstring(example_class):
utilities.get_docstring(example_class.class_method, remove_summary=True)
== "Third line of class method docstring. "
)
assert (
utilities.get_docstring(example_class.class_method_oneline, remove_summary=True)
== "One line docstring. "
)
assert (
utilities.get_docstring(
example_class.class_method, remove_newlines=False, remove_summary=True
Expand Down

0 comments on commit 704cba9

Please sign in to comment.