Пример #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)
Пример #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)
Пример #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))
Пример #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)))
Пример #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))
Пример #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)
Пример #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))
Пример #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))
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))
Пример #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))
Пример #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)
Пример #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)
Пример #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))
Пример #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)
Пример #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))
Пример #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)
Пример #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)
Пример #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))
Пример #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))
Пример #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)
Пример #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))
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)