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

Method test_take

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

Source from the content-addressed store, hash-verified

220 self.assert_type(result)
221
222 def test_take(self):
223 s = self.seq([1, 2, 3, 4, 5, 6])
224 expect = [1, 2, 3, 4]
225 result = s.take(4)
226 self.assertIteratorEqual(result, expect)
227 self.assert_type(result)
228 self.assertIteratorEqual(s.take(0), self.seq([]))
229 self.assertIteratorEqual(s.take(-1), self.seq([]))
230
231 def test_take_while(self):
232 l = [1, 2, 3, 4, 5, 6, 7, 8]

Callers

nothing calls this directly

Calls 3

assertIteratorEqualMethod · 0.95
assert_typeMethod · 0.95
takeMethod · 0.80

Tested by

no test coverage detected