Example #1
0
 def test_append_empty_list_to_list(self):
     self.assertEqual(append([1, 2, 3, 4], []), [1, 2, 3, 4])
Example #2
0
 def test_append_non_empty_lists(self):
     self.assertEqual(append([1, 2], [2, 3, 4, 5]), [1, 2, 2, 3, 4, 5])
Example #3
0
 def test_append_to_empty(self):
     self.assertEqual([42], list_ops.append([], 42))
Example #4
0
 def test_append_empty_lists(self):
     self.assertEqual(append([], []), [])
Example #5
0
 def test_append_tuple(self):
     self.assertEqual(["10", "python", "hello"],
                      list_ops.append(["10", "python"], "hello"))
Example #6
0
 def test_append_range(self):
     self.assertEqual([100, range(1000)], list_ops.append([100],
                                                          range(1000)))
 def test_append_nonempty_lists(self):
     self.assertEqual(list_ops.append([1, 2], [2, 3, 4, 5]),
                      [1, 2, 2, 3, 4, 5])
Example #8
0
 def test_append_empty_list_to_list(self):
     self.assertEqual(list_ops.append([], [1, 2, 3, 4]), [1, 2, 3, 4])
 def test_append_empty_list_to_list(self):
     self.assertEqual(list_ops.append([], [1, 2, 3, 4]), [1, 2, 3, 4])
 def test_append_empty_lists(self):
     self.assertEqual(list_ops.append([], []), [])
Example #11
0
 def test_append_to_empty(self):
     self.assertEqual([42], list_ops.append([], 42))
Example #12
0
 def test_append_range(self):
     self.assertEqual([100, range(1000)], list_ops.append([100], range(1000)))
Example #13
0
 def test_append_tuple(self):
     self.assertEqual(
         ["10", "python", "hello"],
         list_ops.append(["10", "python"], "hello")
     )