Incorrect amount of hours in certain cases #65

Closed
opened 2023-11-10 19:06:33 +00:00 by lukas · 0 comments
Owner
def test_specific_precise_if_unncessary(self):
        delta = timedelta(hours=2, minutes=40)
        result = format_duration(delta, "%02.0H:%02.0m")
        self.assertEqual(result, "02:40")

This test fails by returning "03:40" instead. The problem is in the way format_duration handles fractional hours.

```python def test_specific_precise_if_unncessary(self): delta = timedelta(hours=2, minutes=40) result = format_duration(delta, "%02.0H:%02.0m") self.assertEqual(result, "02:40") ``` This test fails by returning "03:40" instead. The problem is in the way `format_duration` handles fractional hours.
lukas closed this issue 2023-11-10 19:09:18 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lukas/timetracker#65
No description provided.