def test_cumulative_product_empty(): assert cumulative_product([]) == []
def test_cumulative_product_starts_with_zero(values): array = [0] + list(values) assert cumulative_product(array) == [0] * len(array)
def test_cumulative_product_simple(): assert cumulative_product([1, 2, 3]) == [1, 2, 6] assert cumulative_product([3, 2, 1]) == [3, 6, 6] assert cumulative_product([1, 2, 3, 4]) == [1, 2, 6, 24] assert cumulative_product([1, 2, 3, 3]) == [1, 2, 6, 18]