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

Method test_drop_right

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

Source from the content-addressed store, hash-verified

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)
207 expect = [1, 2, 3]
208 result = s.drop_right(2)
209 self.assert_type(result)
210 self.assertIteratorEqual(result, expect)
211 self.assertIteratorEqual(s.drop_right(0), s)
212 self.assertIteratorEqual(s.drop_right(-1), s)
213
214 def test_drop_while(self):
215 l = [1, 2, 3, 4, 5, 6, 7, 8]

Callers

nothing calls this directly

Calls 4

assert_typeMethod · 0.95
assertIteratorEqualMethod · 0.95
mapMethod · 0.80
drop_rightMethod · 0.80

Tested by

no test coverage detected