Skip to content

Commit 1aa6189

Browse files
Added docstrings to each of the tests
1 parent 031fc52 commit 1aa6189

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

tests/unit/test_notifications.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,25 @@ class TestThread(UnitHelper):
1616
example_data = get_notification_example_data()
1717

1818
def test_equality(self):
19+
"""Test equality/inequality between two instances"""
1920
thread = github3.notifications.Thread(get_notification_example_data())
2021
assert self.instance == thread
2122
thread._uniq = 1
2223
assert self.instance != thread
2324

2425
def test_is_unread(self):
26+
"""Show that is_unread() equals unread property"""
2527
assert self.instance.is_unread() == self.instance.unread
2628

2729
def test_last_read_at(self):
30+
"""Show that last_read_at attribute is a datetime type"""
2831
json = self.instance.as_dict().copy()
2932
json['last_read_at'] = '2013-12-31T23:59:59Z'
3033
thread = github3.notifications.Thread(json)
3134
assert isinstance(thread.last_read_at, datetime.datetime)
3235

3336
def test_repr(self):
37+
"""Show instance string is formatted correctly"""
3438
assert repr(self.instance) == '<Thread [{0}]>'.format(
3539
self.instance.subject.get('title'))
3640

tests/unit/test_subscription.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class TestSubscription(UnitHelper):
1313
example_data = get_subscription_example_data()
1414

1515
def test_repr(self):
16+
"""Show that instance is formatted as a string when printed"""
1617
assert isinstance(repr(self.instance), str)
1718

1819
def test_delete(self):

0 commit comments

Comments
 (0)