Пример #1
0
 def test_concat_list_of_nested_lists(self):
     self.assertEqual(
         concat([[[1], [2]], [[3]], [[]], [[4, 5, 6]]]),
         [[1], [2], [3], [], [4, 5, 6]],
     )
Пример #2
0
 def test_concat_empty_list(self):
     self.assertEqual(concat([]), [])
Пример #3
0
 def test_concat_list_of_lists(self):
     self.assertEqual(concat([[1, 2], [3], [], [4, 5, 6]]),
                      [1, 2, 3, 4, 5, 6])
Пример #4
0
 def test_concat_nothing(self):
     self.assertEqual(["orange", "apple", "banana"],
                      list_ops.concat(['orange', 'apple', 'banana'], None))
Пример #5
0
 def test_concat_empty(self):
     self.assertEqual([], list_ops.concat([], []))
 def test_concat_list_of_lists(self):
     self.assertEqual(list_ops.concat([[1, 2], [3], [], [4, 5, 6]]),
                      [1, 2, 3, 4, 5, 6])
Пример #7
0
 def test_concat_two(self):
     self.assertEqual([1, 3, 5, 8, 9, 4, 5, 6],
                      list_ops.concat([1, 3, 5, 8], [9, 4, 5, 6]))
 def test_concat_empty_list(self):
     self.assertEqual(list_ops.concat([]), [])
Пример #9
0
 def test_concat_empty(self):
     self.assertEqual(
         [],
         list_ops.concat([], [])
     )
Пример #10
0
 def test_concat_nothing(self):
     self.assertEqual(
         ["orange", "apple", "banana"],
         list_ops.concat(['orange', 'apple', 'banana'], None)
     )
Пример #11
0
 def test_concat_two(self):
     self.assertEqual(
         [1, 3, 5, 8, 9, 4, 5, 6],
         list_ops.concat([1, 3, 5, 8], [9, 4, 5, 6])
     )
Пример #12
0
 def test_concat_list_of_nested_lists(self):
     self.assertEqual(
         list_ops.concat([[[1], [2]], [[3]], [[]], [[4, 5, 6]]]),
         [[1], [2], [3], [], [4, 5, 6]])