Skip to content

Commit

Permalink
Add additional test for pretty-date
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Oct 13, 2024
1 parent 13606da commit 119add7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions unittest-core.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ def test_021_pretty_date(self):
"""Test pretty_date"""
print('INFO: [TEST_021] pretty_date')
self.assertEqual(pretty_date(datetime(2024, 1, 1, 12, 0), datetime(2024, 1, 1, 12, 0)), 'just now')
self.assertEqual(pretty_date(1704106790, datetime(2024, 1, 1, 12, 0)), '10 secs')
self.assertEqual(pretty_date(datetime(2024, 1, 1, 11, 59), datetime(2024, 1, 1, 12, 0)), 'a min')
self.assertEqual(pretty_date(datetime(2024, 1, 1, 11, 55), datetime(2024, 1, 1, 12, 0)), '5 mins')
self.assertEqual(pretty_date(datetime(2024, 1, 1, 11, 0), datetime(2024, 1, 1, 12, 0)), 'an hour')
Expand Down

0 comments on commit 119add7

Please sign in to comment.