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

Method test_map

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

Source from the content-addressed store, hash-verified

261 self.assertSetEqual(result.set(), set(expect))
262
263 def test_map(self):
264 f = lambda x: x * 2
265 l = [1, 2, 0, 5]
266 expect = [2, 4, 0, 10]
267 result = self.seq(l).map(f)
268 self.assertIteratorEqual(expect, result)
269 self.assert_type(result)
270
271 def test_select(self):
272 f = lambda x: x * 2

Callers

nothing calls this directly

Calls 3

assertIteratorEqualMethod · 0.95
assert_typeMethod · 0.95
mapMethod · 0.80

Tested by

no test coverage detected