コード例 #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)
コード例 #9
0
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))
コード例 #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))
コード例 #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))
コード例 #18
0
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)