Exemplo n.º 1
0
def test_multiply_different_numbers():
    """Ensure that multiplying the list of integers works correctly."""
    values = [1, 2, 3, 4]
    multiplication_result = factorial.multiply(values)
    assert multiplication_result == 1 * 2 * 3 * 4
Exemplo n.º 2
0
def test_multiply_same_numbers_identity():
    """Ensure that multiplying the list of integers works correctly for identity."""
    values = [1, 1, 1, 1]
    multiplication_result = factorial.multiply(values)
    assert multiplication_result == 1
Exemplo n.º 3
0
def test_multiply_same_numbers_contains_zero_reorder():
    """Ensure that multiplying the list of integers works correctly with zero and reordered."""
    values = [3, 2, 1, 0]
    multiplication_result = factorial.multiply(values)
    assert multiplication_result == 0
Exemplo n.º 4
0
def test_multiply_different_numbers_reorder():
    """Ensure that multiplying the list of integers works correctly when reordered."""
    values = [4, 3, 2, 1]
    multiplication_result = factorial.multiply(values)
    assert multiplication_result == 1 * 2 * 3 * 4