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

Method test_average

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

Source from the content-addressed store, hash-verified

684 self.assertEqual(12, self.seq(l).sum(lambda x: x * 2))
685
686 def test_average(self):
687 l = [1, 2]
688 self.assertEqual(1.5, self.seq(l).average())
689 self.assertEqual(4.5, self.seq(l).average(lambda x: x * 3))
690
691 def test_set(self):
692 l = [1, 1, 2, 2, 3]

Callers

nothing calls this directly

Calls 1

averageMethod · 0.80

Tested by

no test coverage detected