def test_format_negative_timedelta(): from datetime import datetime from ringo.lib.helpers import format_timedelta start = datetime(1977, 3, 7, 0, 0) end = datetime(1977, 3, 7, 1, 0) result = format_timedelta(start - end) assert result == "-01:00:00"
def test_format_positiv_timedelta(): from datetime import datetime from ringo.lib.helpers import format_timedelta start = datetime(1977, 3, 7, 0, 0) end = datetime(1977, 3, 7, 1, 0) result = format_timedelta(end - start) assert result == "01:00:00"