Пример #1
0
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"
Пример #2
0
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"
Пример #3
0
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"
Пример #4
0
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"