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