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

Method test_list

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

Source from the content-addressed store, hash-verified

723 self.assertEqual(result, [1, 2])
724
725 def test_list(self):
726 l = [1, 2, 3, "abc", {1: 2}, {1, 2, 3}]
727 result = self.seq(l).list()
728 self.assertEqual(result, l)
729 self.assertTrue(isinstance(result, list))
730 result = self.seq(iter([0, 1, 2])).to_list()
731 self.assertIsInstance(result, list)
732 result = self.seq(l).list(n=2)
733 self.assertEqual(result, [1, 2])
734
735 def test_for_each(self):
736 l = [1, 2, 3, "abc", {1: 2}, {1, 2, 3}]

Callers

nothing calls this directly

Calls 2

listMethod · 0.80
to_listMethod · 0.80

Tested by

no test coverage detected