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

Method test_drop

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

Source from the content-addressed store, hash-verified

194 self.assertIteratorEqual(l.tails().map(lambda s: s.sum()), [6, 5, 3, 0])
195
196 def test_drop(self):
197 s = self.seq([1, 2, 3, 4, 5, 6])
198 expect = [5, 6]
199 result = s.drop(4)
200 self.assertIteratorEqual(result, expect)
201 self.assert_type(result)
202 self.assertIteratorEqual(s.drop(0), s)
203 self.assertIteratorEqual(s.drop(-1), s)
204
205 def test_drop_right(self):
206 s = self.seq([1, 2, 3, 4, 5]).map(lambda x: x)

Callers

nothing calls this directly

Calls 3

assertIteratorEqualMethod · 0.95
assert_typeMethod · 0.95
dropMethod · 0.80

Tested by

no test coverage detected