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