Esempio n. 1
0
def test_raise_on_empty_with_empty():
    xs = []
    with pytest.raises(main.EmptyQueryResult):
        main.raise_on_empty(sum)(xs)
Esempio n. 2
0
def test_raise_on_empty_with_empty():
    xs = []
    with pytest.raises(main.EmptyQueryResult):
        main.raise_on_empty(sum)(xs)
Esempio n. 3
0
def test_raise_on_empty_without_empty():
    xs = [1, 2, 3, 4]
    assert main.raise_on_empty(sum)(xs) == 10
Esempio n. 4
0
def test_raise_on_empty_without_empty():
    xs = [1, 2, 3, 4]
    assert main.raise_on_empty(sum)(xs) == 10