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