Beispiel #1
0
 def test_merge_lists(self):
     self.assertEqual(merge_lists([1, 3, 4, 5], [2, 6, 7, 8]),
                      [1, 2, 3, 4, 5, 6, 7, 8])
     self.assertEqual(merge_lists([4, 5, 6], [-2, -1, 0, 7]),
                      [-2, -1, 0, 4, 5, 6, 7])
 def test_none_lists(self):
     self.assertEqual(print_list(merge_lists(None, None)), [])
 def test_l1_none(self):
     l1 = make_list([])
     l2 = make_list([-2, 2, 3])
     self.assertEqual(print_list(merge_lists(l1, l2)), [-2, 2, 3])
 def test_merge_lists(self):
     l1 = make_list([-1, 2, 6])
     l2 = make_list([-2, 2, 3])
     self.assertEqual(print_list(merge_lists(l1, l2)), [-2, -1, 2, 2, 3, 6])