import codewars_test as test # TODO Write tests import solution # or from solution import example # test.assert_equals(actual, expected, [optional] message) @test.describe("Simple tests") def test_group(): @test.it("Short lists") def test_case(): test.assert_equals(prod([1,1]), 1) test.assert_equals(prod([]), 0) test.assert_equals(prod([7, 2, -3, 8]), -336) test.assert_equals(prod([239, 210, 100, 0, 67, -321, 1]), 0) test.assert_equals(prod(range(1,10)), 362880)
- import codewars_test as test
- # TODO Write tests
- import solution # or from solution import example
- # test.assert_equals(actual, expected, [optional] message)
- @test.describe("Simple tests")
- def test_group():
- @test.it("Short lists")
- def test_case():
- test.assert_equals(prod([1,1]), 1)
- test.assert_equals(prod([]), 0)
- test.assert_equals(prod([7, 2, -3, 8]), -336)
- test.assert_equals(prod([239, 210, 100, 0, 67, -321, 1]), 0)
- test.assert_equals(prod(range(1,10)), 362880)