def test_submitting_list(label1, label2):
    q = SimpleLabellingQueue()
    q.enqueue(1)
    with pytest.raises(ValueError):
        q.submit(0, label1)
    id_, val = q.pop()
    q.submit(id_, [label1, label2])
    assert q.list_labels() == {label1, label2}
def test_submitting_text(label1, label2):
    q = SimpleLabellingQueue()
    q.enqueue(1)
    q.enqueue(2)
    with pytest.raises(ValueError):
        q.submit(0, label1)
    id_, val = q.pop()
    q.submit(id_, label1)
    assert q.progress == 0.5
    id_, val = q.pop()
    q.submit(id_, label2)
    assert q.progress == 1
    assert q.list_labels() == {label1, label2}