Skip to content

Commit

Permalink
Fix error in test for td_format_for_now
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <normandf@mila.quebec>
  • Loading branch information
lebrice committed Apr 15, 2024
1 parent 289de0e commit 0ff91e3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions milatools/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,13 +437,13 @@ def td_format_from_now(td_object: datetime.timedelta) -> str:
Can also be negative.
>>> td_format(datetime.timedelta(days=1, hours=2, minutes=3, seconds=4))
>>> td_format_from_now(datetime.timedelta(days=1, hours=2, minutes=3, seconds=4))
'in 1 day, 2 hours, 3 minutes and 4 seconds'
>>> td_format(datetime.timedelta(seconds=1))
>>> td_format_from_now(datetime.timedelta(seconds=1))
'in 1 second'
>>> td_format(datetime.timedelta(seconds=0))
>>> td_format_from_now(datetime.timedelta(seconds=0))
'now'
>>> td_format(datetime.timedelta(seconds=-1, days=-1))
>>> td_format_from_now(datetime.timedelta(seconds=-1, days=-1))
'1 day and 1 second ago'
Slightly modified from https://stackoverflow.com/a/13756038/6388696
Expand Down

0 comments on commit 0ff91e3

Please sign in to comment.