예제 #1
0
def test_drop_function_with_no_iterable():
    operator = Drop()
    with pytest.raises(TypeError):
        operator.function(None, 1)
예제 #2
0
def test_drop_function_when_droping_zero_values():
    operator = Drop()
    actual = operator.function([1, 2, 3], 0)
    assert actual == [1, 2, 3]
예제 #3
0
def test_drop_function_with_invalid_iterable():
    operator = Drop()
    with pytest.raises(TypeError):
        operator.function(1, 1)
예제 #4
0
def test_drop_function_when_droping_more_values_than_exist():
    operator = Drop()
    actual = operator.function([1, 2, 3], 5)
    assert actual == []