Exemple #1
0
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
Exemple #2
0
def test_one_not_iterable():
    assert i.one(1) == 1
Exemple #3
0
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1,2))
Exemple #4
0
def test_one():
    assert i.one((1,)) == 1
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1, 2))
def test_one_not_iterable():
    assert i.one(1) == 1
def test_one():
    assert i.one((1, )) == 1