Skip to content

Commit

Permalink
add very basic test for __repr__ methods
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdavham committed Jan 25, 2025
1 parent 1e37cf3 commit 52874ac
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,3 +680,16 @@ def test_maximum_interval(self):
card=card, rating=Rating.Good, review_datetime=card.due
)
assert (card.due - card.last_review).days <= scheduler.maximum_interval

def test_class_repr(self):
card = Card()

assert str(card) == repr(card)

scheduler = Scheduler()

assert str(scheduler) == repr(scheduler)

card, review_log = scheduler.review_card(card=card, rating=Rating.Good)

assert str(review_log) == repr(review_log)

0 comments on commit 52874ac

Please sign in to comment.