예제 #1
0
 def test_append_empty_list_to_list(self):
     self.assertEqual(append([1, 2, 3, 4], []), [1, 2, 3, 4])
예제 #2
0
 def test_append_non_empty_lists(self):
     self.assertEqual(append([1, 2], [2, 3, 4, 5]), [1, 2, 2, 3, 4, 5])
예제 #3
0
 def test_append_to_empty(self):
     self.assertEqual([42], list_ops.append([], 42))
예제 #4
0
 def test_append_empty_lists(self):
     self.assertEqual(append([], []), [])
예제 #5
0
 def test_append_tuple(self):
     self.assertEqual(["10", "python", "hello"],
                      list_ops.append(["10", "python"], "hello"))
예제 #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])
예제 #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])
예제 #10
0
 def test_append_empty_lists(self):
     self.assertEqual(list_ops.append([], []), [])
예제 #11
0
 def test_append_to_empty(self):
     self.assertEqual([42], list_ops.append([], 42))
예제 #12
0
 def test_append_range(self):
     self.assertEqual([100, range(1000)], list_ops.append([100], range(1000)))
예제 #13
0
 def test_append_tuple(self):
     self.assertEqual(
         ["10", "python", "hello"],
         list_ops.append(["10", "python"], "hello")
     )