Exemplo n.º 1
0
def test_pop():
    state = State(stack=[1, 2])
    state.pop()
    assert state.stack == [1]
Exemplo n.º 2
0
def test_pop_empty_stack():
    state = State()
    with pytest.raises(exc.StackError):
        state.pop()