Exemplo n.º 1
0
def test_get_desk_spans_empty():
    t1 = Timestamp.min
    t2 = Timestamp.max
    model = Model(StubDataStore.empty())

    result = model.get_desk_spans(t1, t2)

    expected = make_spans([(t1, t2, DOWN)])
    assert_frame_equal(result, expected)
Exemplo n.º 2
0
def test_get_desk_spans_one_up_span():
    t1 = Timestamp(2018, 1, 1)
    t2 = Timestamp(2018, 1, 2)
    t3 = Timestamp(2018, 1, 3)
    model = Model(StubDataStore(session_events=[], desk_events=[(t2, UP)]))

    result = model.get_desk_spans(t1, t3)

    expected = make_spans([(t1, t2, DOWN), (t2, t3, UP)])
    assert_frame_equal(result, expected)