예제 #1
0
파일: test_lib.py 프로젝트: Kareeeeem/abyad
def test_load_empty_stack():
    state = State(heap={5: 80})
    with pytest.raises(exc.StackError):
        state.load()
예제 #2
0
파일: test_lib.py 프로젝트: Kareeeeem/abyad
def test_load_key_not_in_heap():
    state = State(stack=[5])
    with pytest.raises(exc.HeapError):
        state.load()
예제 #3
0
파일: test_lib.py 프로젝트: Kareeeeem/abyad
def test_load():
    state = State(heap={5: 80}, stack=[5])
    state.load()
    assert state.stack == [80]