Exemplo n.º 1
0
 def test_worker_processes_exception(self):
     task = Task(will_fail, (), {})
     rsl = self.roundtrip_task(task)
     assert isinstance(rsl.exception, ExceptionForTest)
Exemplo n.º 2
0
 def test_hung_worker_uninterruptible(self):
     task = Task(will_busyhang_uninterruptible, (), {})
     self.send_task(task)
     time.sleep(1.0)
     self.test_core.send_message(self.ann_socket, Message.SHUTDOWN)
     self.test_worker.join()
Exemplo n.º 3
0
 def test_worker_processes_task(self):
     r = random_int()
     task = Task(identity, (r,), {})
     rsl = self.roundtrip_task(task)
     assert rsl.result == r