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

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

        map0_n = lambda f,n: map(f, range(n))
        


src/l/i/list115utils-1.0.1/list115utils/test/test_listutils.py   list115utils(Download)
        self.assertEqual(xsum(self.simple_list), sum(self.simple_list))
 
from list115utils import map0_n
class TestMap0n(TestListUtils):
    def test_map0_n_can_shift_up(self):
        self.assertEqual(map0_n(f_inc, 6), self.simple_list)
 
    def test_map0_n_can_double(self):
        self.assertEqual(map0_n(f_dbl, 5), [0,2,4,6,8])
    def test_map0_works_for_zero(self):
        self.assertEqual(map0_n(f_dbl, 0), [])
 
from list115utils import map1_n
class TestMap1n(TestListUtils):