コード例 #1
0
ファイル: test_iterable.py プロジェクト: eBay/wextracto
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
コード例 #2
0
ファイル: test_iterable.py プロジェクト: eBay/wextracto
def test_one_not_iterable():
    assert i.one(1) == 1
コード例 #3
0
ファイル: test_iterable.py プロジェクト: eBay/wextracto
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1,2))
コード例 #4
0
ファイル: test_iterable.py プロジェクト: eBay/wextracto
def test_one():
    assert i.one((1,)) == 1
コード例 #5
0
ファイル: test_iterable.py プロジェクト: ortodesign/wextracto
def test_one_with_zero_values():
    with pytest.raises(i.ZeroValuesError):
        i.one(())
コード例 #6
0
ファイル: test_iterable.py プロジェクト: ortodesign/wextracto
def test_one_with_multiple_values():
    with pytest.raises(i.MultipleValuesError):
        i.one((1, 2))
コード例 #7
0
ファイル: test_iterable.py プロジェクト: ortodesign/wextracto
def test_one_not_iterable():
    assert i.one(1) == 1
コード例 #8
0
ファイル: test_iterable.py プロジェクト: ortodesign/wextracto
def test_one():
    assert i.one((1, )) == 1