예제 #1
0
def test_compute_remainders_three():

    assert compute_remainders(3, [2, 3, 4]) == [1, 0, 3]
예제 #2
0
def test_compute_remainders_as_in_python(n, m):

    assert compute_remainders(n, [m]) == [n % m]
예제 #3
0
def test_compute_remainders_zero():

    # If you ask for the remainder after dividing by zero, it is your fault
    with pytest.raises(ZeroDivisionError) as e:
        compute_remainders(42, [0])
예제 #4
0
def test_compute_remainders_single(n):

    assert compute_remainders(0, [n]) == [0]
예제 #5
0
def test_compute_remainders_empty():

    assert compute_remainders(0, []) == []