Example #1
0
 def test_flatten_dict(self):
     assert (list(flatten([[{
         'a': 1
     }], {
         'b': 2
     }, 'c'], {'d': 3})) == [{
         'a': 1
     }, {
         'b': 2
     }, 'c', {
         'd': 3
     }])
Example #2
0
 def test_flatten_dict(self):
     assert (list(flatten([[{'a': 1}], {'b': 2}, 'c'], {'d': 3}))
         == [{'a': 1}, {'b': 2}, 'c', {'d': 3}])
Example #3
0
 def test_flatten_args(self):
     assert (list(flatten(1, [2, 3],
                          (4, ('five', 6)))) == [1, 2, 3, 4, 'five', 6])
Example #4
0
 def test_flatten_args(self):
     assert (list(flatten(1, [2, 3], (4, ('five', 6))))
         == [1, 2, 3, 4, 'five', 6])