示例#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