Ejemplo n.º 1
0
def test_pop():
    set1 = OrderedSet('ab')
    elem = set1.pop()

    assert elem == 'b'
    elem = set1.pop()

    assert elem == 'a'

    with pytest.raises(KeyError):
        set1.pop()
def test_pop():
    set1 = OrderedSet("ab")
    elem = set1.pop()

    assert elem == "b"
    elem = set1.pop()

    assert elem == "a"

    with pytest.raises(KeyError):
        set1.pop()