MCPcopy Create free account
hub / github.com/EntilZha/PyFunctional / test_product

Method test_product

functional/test/test_functional.py:670–679  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

668 )
669
670 def test_product(self):
671 l = [2, 2, 3]
672 self.assertEqual(12, self.seq(l).product())
673 self.assertEqual(96, self.seq(l).product(lambda x: x * 2))
674 s = self.seq([])
675 self.assertEqual(1, s.product())
676 self.assertEqual(2, s.product(lambda x: x * 2))
677 s = self.seq([5])
678 self.assertEqual(5, s.product())
679 self.assertEqual(10, s.product(lambda x: x * 2))
680
681 def test_sum(self):
682 l = [1, 2, 3]

Callers

nothing calls this directly

Calls 1

productMethod · 0.80

Tested by

no test coverage detected