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

Method test_to_list

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

Source from the content-addressed store, hash-verified

713 self.assert_type(result)
714
715 def test_to_list(self):
716 l = [1, 2, 3, "abc", {1: 2}, {1, 2, 3}]
717 result = self.seq(l).to_list()
718 self.assertIteratorEqual(result, l)
719 self.assertTrue(isinstance(result, list))
720 result = self.seq(iter([0, 1, 2])).to_list()
721 self.assertIsInstance(result, list)
722 result = self.seq(l).list(n=2)
723 self.assertEqual(result, [1, 2])
724
725 def test_list(self):
726 l = [1, 2, 3, "abc", {1: 2}, {1, 2, 3}]

Callers

nothing calls this directly

Calls 3

assertIteratorEqualMethod · 0.95
to_listMethod · 0.80
listMethod · 0.80

Tested by

no test coverage detected