Exemplo n.º 1
0
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
Exemplo n.º 2
0
def test_one_not_iterable():
    assert i.one(1) == 1
Exemplo n.º 3
0
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1,2))
Exemplo n.º 4
0
def test_one():
    assert i.one((1,)) == 1
Exemplo n.º 5
0
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
Exemplo n.º 6
0
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1, 2))
Exemplo n.º 7
0
def test_one_not_iterable():
    assert i.one(1) == 1
Exemplo n.º 8
0
def test_one():
    assert i.one((1, )) == 1