Skip to content

Commit

Permalink
Complete coverage of natural time
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Aug 23, 2013
1 parent 648656e commit aab1f63
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions trans/tests/test_naturaldate.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,32 @@

TEST_DATA = (
(0, 'now'),
(1, 'a second from now'),
(-1, 'a second ago'),
(60, 'a minute from now'),
(-60, 'a minute ago'),
(120, '2 minutes from now'),
(-120, '2 minutes ago'),
(3600 * 24, 'tomorrow'),
(-3600 * 24, 'yesterday'),
(3600 * 24 * 2, '2 days from now'),
(-3600 * 24 * 2, '2 days ago'),
(3600, 'an hour from now'),
(-3600, 'an hour ago'),
(3600 * 2, '2 hours from now'),
(-3600 * 2, '2 hours ago'),
(3600 * 24, 'tomorrow'),
(-3600 * 24, 'yesterday'),
(3600 * 24 * 2, '2 days from now'),
(-3600 * 24 * 2, '2 days ago'),
(3600 * 24 * 7, 'a week from now'),
(-3600 * 24 * 7, 'a week ago'),
(3600 * 24 * 14, '2 weeks from now'),
(-3600 * 24 * 14, '2 weeks ago'),
(3600 * 24 * 30, 'a month from now'),
(-3600 * 24 * 30, 'a month ago'),
(3600 * 24 * 60, '2 months from now'),
(-3600 * 24 * 60, '2 months ago'),
(3600 * 24 * 365, 'a year from now'),
(-3600 * 24 * 365, 'a year ago'),
(3600 * 24 * 365 * 2, '2 years from now'),
(-3600 * 24 * 365 * 2, '2 years ago'),
)


Expand Down

0 comments on commit aab1f63

Please sign in to comment.