class TestMultiProcEnv(unittest.TestCase, BaseGobTests): def setUp(self): path = clean_data_dir() self.env = MultiProcEnv(path) self.gob = Gob(self.env) create_jobs(self.gob) def test_map(self): self.env.save('counter.2',xrange(2,100,10)) self.env.save('counter.3',xrange(3,100,10)) self.gob.run_job('expand') first = self.env.load('expand.2').next() self.assertEqual( first, {'digits':(2,),'num':2} )
def setUp(self): path = clean_data_dir() self.env = MultiProcEnv(path) self.gob = Gob(self.env) create_jobs(self.gob)