(self)
| 147 | l.head() |
| 148 | |
| 149 | def test_head_option(self): |
| 150 | l = self.seq([1, 2, 3]).map(lambda x: x) |
| 151 | self.assertEqual(l.head_option(), 1) |
| 152 | l = self.seq([[1, 2], 3, 4]).map(lambda x: x) |
| 153 | self.assertEqual(l.head_option(), [1, 2]) |
| 154 | self.assert_type(l.head_option()) |
| 155 | l = self.seq([]) |
| 156 | self.assertIsNone(l.head_option()) |
| 157 | |
| 158 | def test_last(self): |
| 159 | l = self.seq([1, 2, 3]).map(lambda x: x) |
nothing calls this directly
no test coverage detected