Exemplo n.º 1
0
def test_change_priority_for_non_existing_item_in_filled_q():
    q = [[2, 'item']]
    algorithm._change_priority(q, 2, 'item2')
    eq_(q, [[2, 'item'], [2, 'item2']])
Exemplo n.º 2
0
def test_change_priority_for_existing_item():
    q = [[1, 'item']]
    algorithm._change_priority(q, 2, 'item')
    eq_(q, [[2, 'item']])
Exemplo n.º 3
0
def test_change_priority_for_non_existing_item_in_empty_q():
    q = []
    algorithm._change_priority(q, 2, 'item')
    eq_(q, [[2, 'item']])