Beispiel #1
0
    def test_pair(self):
        self.assertEqual(list(pair([1, 2, 3, 4, 5, 6])), [(1, 2), (3, 4),
                                                          (5, 6)])

        self.assertEqual(list(pair([1, 2, 3, 4, 5, 6, 7])), [(1, 2), (3, 4),
                                                             (5, 6),
                                                             (7, None)])
Beispiel #2
0
    def test_pair(self):
        self.assertEqual(
            list(pair([1, 2, 3, 4, 5, 6])),
            [(1, 2), (3, 4), (5, 6)]
        )

        self.assertEqual(
            list(pair([1, 2, 3, 4, 5, 6, 7])),
            [(1, 2), (3, 4), (5, 6), (7, None)]
        )