Exemplo n.º 1
0
 def test_depth_1_tuple(self):
     self.assertEqual(flatten_collection([1, 2, 3], tuple), (1, 2, 3))
Exemplo n.º 2
0
 def test_depth_3_tuple(self):
     self.assertEqual(flatten_collection([1, [u'5', (6, 6, 6), u'7'], [3, 3, 3]], tuple),
                      (1, u'5', 6, 6, 6, u'7', 3, 3, 3))
Exemplo n.º 3
0
 def test_depth_1_list(self):
     self.assertEqual(flatten_collection([1, 2, 3], list), [1, 2, 3])
Exemplo n.º 4
0
 def test_depth_2_tuple(self):
     self.assertEqual(flatten_collection([1, 2, 3], tuple), (1, u'5', u'6', u'7', 3))
Exemplo n.º 5
0
 def test_depth_3_list(self):
     self.assertEqual(flatten_collection([1, [u'5', (6, 6, 6), u'7'], [3, 3, 3]], list),
                      [1, u'5', 6, 6, 6, u'7', 3, 3, 3])
Exemplo n.º 6
0
 def test_depth_1_tuple(self):
     self.assertEqual(flatten_collection([1, 2, 3], tuple), (1, 2, 3))
Exemplo n.º 7
0
 def test_depth_2_list(self):
     self.assertEqual(flatten_collection([1, [u'5', u'6', u'7'], 3], list), [1, u'5', u'6', u'7', 3])
Exemplo n.º 8
0
 def test_depth_1_list(self):
     self.assertEqual(flatten_collection([1, 2, 3], list), [1, 2, 3])
Exemplo n.º 9
0
 def test_depth_3_tuple(self):
     self.assertEqual(
         flatten_collection([1, [u'5', (6, 6, 6), u'7'], [3, 3, 3]], tuple),
         (1, u'5', 6, 6, 6, u'7', 3, 3, 3))
Exemplo n.º 10
0
 def test_depth_3_list(self):
     self.assertEqual(
         flatten_collection([1, [u'5', (6, 6, 6), u'7'], [3, 3, 3]], list),
         [1, u'5', 6, 6, 6, u'7', 3, 3, 3])
Exemplo n.º 11
0
 def test_depth_2_tuple(self):
     self.assertEqual(
         flatten_collection([1, [u'5', u'666', u'7'], 3], tuple),
         (1, u'5', u'666', u'7', 3))
Exemplo n.º 12
0
 def test_depth_2_list(self):
     self.assertEqual(flatten_collection([1, [u'5', u'6', u'7'], 3], list),
                      [1, u'5', u'6', u'7', 3])