示例#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])
 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")
     )