Example #1
0
 def test_no_result(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 1)], [(b1, 1), (v, 1)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(results, [])
Example #2
0
 def test_more_workers_than_processes(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 2)], [(b1, 2), (b2, 2)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(len(results), 20)
Example #3
0
 def test_parallel_workers(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 1)], [(b1, 2), (b2, 1)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(len(results), 10)
Example #4
0
 def test_no_result(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 1)], [(b1, 1), (v, 1)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(results, [])
Example #5
0
 def test_more_workers_than_processes(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 2)], [(b1, 2), (b2, 2)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(len(results), 20)
Example #6
0
 def test_parallel_workers(self):
     for _ in range(TEST_RUNS):
         pipeline = Pipeline([(s, 1)], [(b1, 2), (b2, 1)])
         results = list(pipeline.start(n_jobs=4))
         self.assertEqual(len(results), 10)