Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(3)  |  Derive(0)  |  Import(1)

            return lambda *args, **kwargs: \
        func(curried(*args, **kwargs))
        


src/l/i/list115utils-1.0.1/list115utils/test/test_listutils.py   list115utils(Download)
        self.assertEqual(listor_([-1,3,4]), -1)
 
from list115utils import flatten
class TestFlatten(TestListUtils):
    def test_flatten_works_on_shallow_list(self):
        l = [[1], [2, 3], [], [4, 5], [6,]]
        self.assertListEqual(flatten(l), self.simple_list)
    def test_flatten_does_shallow_flatten_on_deeply_nested_list(self):
        l = [['1', ['apple', 'orange'], [], '3'], [4,5,6], [], ['b']]
        self.assertListEqual(flatten(l), ['1', ['apple', 'orange'], [], '3', 4, 5, 6, 'b'])
 
    def test_flatten_works_on_empty_list(self):
        self.assertListEqual(flatten([]), [])