def test_pipelines_can_be_executed_in_processes(self):
     p_queue = multiprocessing.Queue()
     count.connect(increment)
     increment.connect(save_to(p_queue))
     p_pype = ProcessPipelineFactory()
     p_pype.run_pipeline(count)
     result = []
     while len(result) < count.until:
         result.append(p_queue.get())
     self.assertEqual(result, ONE_TO_TEN)
 def test_pipelines_can_be_executed_in_threads(self):
     t_queue = queue.Queue()
     count.connect(increment)
     increment.connect(save_to(t_queue))
     t_pype = ThreadPipelineFactory()
     t_pype.run_pipeline(count)
     result = []
     while len(result) < count.until:
         result.append(t_queue.get())
     self.assertEqual(result, ONE_TO_TEN)