def test_throughput_history(predictions, make_summaries):
    backlog_start = 10
    zero_work_modulo = 3
    step = 1
    summaries = make_summaries(backlog_start, step, zero_work_modulo)

    expected_throughput_history = [1, 1, 0, 1, 1, 0, 1, 1, 0]

    assert expected_throughput_history == predictions.throughput_history(summaries)
def test_throughput_history_negative(predictions, make_summary):
    s1 = make_summary(complete=0, incomplete=5, total=5)
    s2 = make_summary(complete=3, incomplete=2, total=5)
    s3 = make_summary(complete=2, incomplete=2, total=4)

    assert [3, 0] == predictions.throughput_history([s1, s2, s3])