Beispiel #1
0
def test_load_empty_stack():
    state = State(heap={5: 80})
    with pytest.raises(exc.StackError):
        state.load()
Beispiel #2
0
def test_load_key_not_in_heap():
    state = State(stack=[5])
    with pytest.raises(exc.HeapError):
        state.load()
Beispiel #3
0
def test_load():
    state = State(heap={5: 80}, stack=[5])
    state.load()
    assert state.stack == [80]