def test_my_product(): """ Test my_product() on simple case. """ nt.assert_equal(my_product([1, 2, 3]), 6)
def my_func(numbers): """ Difference between sum and product of sequence. """ product_value = my_product(numbers) sum_value = sum(numbers) return product_value - sum_value