Exemplo n.º 1
0
def test_sum_durations():
    now = datetime.now(timezone.utc)
    events = []
    for i in range(10):
        events.append(Event(timestamp=now + timedelta(seconds=i), duration=timedelta(seconds=1)))
    result = sum_durations(events)
    assert result == timedelta(seconds=10)
def test_sum_durations():
    now = datetime.now(timezone.utc)
    events = []
    for i in range(10):
        events.append(Event(timestamp=now + timedelta(seconds=i), duration=timedelta(seconds=1)))
    result = sum_durations(events)
    assert result == timedelta(seconds=10)
Exemplo n.º 3
0
def q2_sum_durations(events: list) -> timedelta:
    return sum_durations(events)
def q2_sum_durations(events: list) -> timedelta:
    _verify_variable_is_type(events, list)
    return sum_durations(events)
Exemplo n.º 5
0
def q2_sum_durations(events: list) -> timedelta:
    _verify_variable_is_type(events, list)
    return sum_durations(events)