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

Method test_select

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

Source from the content-addressed store, hash-verified

269 self.assert_type(result)
270
271 def test_select(self):
272 f = lambda x: x * 2
273 l = [1, 2, 0, 5]
274 expect = [2, 4, 0, 10]
275 result = self.seq(l).select(f)
276 self.assertIteratorEqual(expect, result)
277 self.assert_type(result)
278
279 def test_starmap(self):
280 f = lambda x, y: x * y

Callers

nothing calls this directly

Calls 3

assertIteratorEqualMethod · 0.95
assert_typeMethod · 0.95
selectMethod · 0.80

Tested by

no test coverage detected