Ejemplo n.º 1
0
def test_starfilter_failure10():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        # won't work with return_True because then "iternext" is refreshed
        # before the failure comes.
        list(starfilter(iteration_utilities.return_False, _hf.CacheNext([1])))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 2
0
def test_grouper_failure7():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        # I use "next" here otherwise it would be interpreted as last group...
        # because the original "next" indicates the end of the iterator.
        next(grouper(_hf.CacheNext(1), 2))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 3
0
def test_one_failure7():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        one(_hf.CacheNext(1))
Ejemplo n.º 4
0
def test_duplicates_failure7():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        list(duplicates(_hf.CacheNext(1)))
Ejemplo n.º 5
0
def test_all_monotone_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        all_monotone(_hf.CacheNext(1))
Ejemplo n.º 6
0
def test_allisinstance_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        all_isinstance(_hf.CacheNext(1), int)
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 7
0
def test_split_failure12():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        list(split(_hf.CacheNext(1), lambda x: x == 10))
Ejemplo n.º 8
0
def test_groupedby_failure10():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        groupedby(_hf.CacheNext(1), iteration_utilities.return_True)
    assert _hf.CacheNext.EXC_MSG in str(exc)
def test_successive_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        list(successive(_hf.CacheNext(1), 3))
Ejemplo n.º 10
0
def test_dotproduct_failure9():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        dotproduct(_hf.CacheNext(1), _hf.CacheNext(1))
Ejemplo n.º 11
0
def test_nth_failure15():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        nth(2)(_hf.CacheNext(1))
Ejemplo n.º 12
0
def test_clamp_failure6():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        # needs to be outside of the range and "remove=True"
        list(clamp(_hf.CacheNext(1), 2, remove=True))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 13
0
def test_count_failure8():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        count_items(_hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 14
0
def test_all_equal_failure4():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        all_equal(_hf.CacheNext(1))
Ejemplo n.º 15
0
def test_successive_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        list(successive(_hf.CacheNext(1), 3))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 16
0
def test_partition_failure8():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        partition(_hf.CacheNext(1))
Ejemplo n.º 17
0
def test_alldistinct_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        all_distinct(_hf.CacheNext(1))
def test_allisinstance_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        all_isinstance(_hf.CacheNext(1), int)
Ejemplo n.º 19
0
def test_partition_failure8():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        partition(_hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 20
0
def test_argmin_failure11():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        argmin(_hf.CacheNext(1))
Ejemplo n.º 21
0
def test_minmax_failure15():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        minmax(_hf.CacheNext(1))
Ejemplo n.º 22
0
def test_nth_failure15():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        nth(2)(_hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 23
0
def test_count_failure8():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        count_items(_hf.CacheNext(1))
Ejemplo n.º 24
0
def test_split_failure12():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        list(split(_hf.CacheNext(1), lambda x: x == 10))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 25
0
def test_all_monotone_failure5():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        all_monotone(_hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 26
0
def test_argmin_failure11():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        argmin(_hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 27
0
def test_duplicates_failure7():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        list(duplicates(_hf.CacheNext(1)))
    assert _hf.CacheNext.EXC_MSG in str(exc)
Ejemplo n.º 28
0
def test_groupedby_failure10():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP, match=_hf.CacheNext.EXC_MSG):
        groupedby(_hf.CacheNext(1), iteration_utilities.return_True)
Ejemplo n.º 29
0
def test_dotproduct_failure9():
    # Changing next method
    with pytest.raises(_hf.CacheNext.EXC_TYP) as exc:
        dotproduct(_hf.CacheNext(1), _hf.CacheNext(1))
    assert _hf.CacheNext.EXC_MSG in str(exc)