def test_ok(self): self.assertEqual(popen(lambda: 1).wait(1), 0)
def test_wait_all_3(self): def check(): sleep(0.05) raise ValueError() self.assertEqual(wait_all(popen(check), popen(lambda: 1)), [1, 0])
def test_wait_all_1(self): def check(): raise ValueError() self.assertEqual(wait_all(popen(lambda: 1), popen(check)), [0, 1])
def test_fail(self): def check(): raise ValueError() self.assertEqual(popen(check).wait(1), 1)
def _start_worker_inst(self): popen(worker_inst, logging_config(), self.fn, origin(BACKEND))
def popen(self, fn, *args, **kwargs): b = popen(helper_main, self.ls, fn, *args, **kwargs) self.ps.add(b) return b