(self, start_method)
| 124 | |
| 125 | @params(*start_methods) |
| 126 | def test_pool_one_task(self, start_method): |
| 127 | groups = [MockGroup.from_callback(simple_callback)] |
| 128 | with create_pool( |
| 129 | groups, keep_alive_queue_size=1, num_workers=1, start_method=start_method |
| 130 | ) as pool: |
| 131 | pids = get_pids(pool) |
| 132 | pid = pids[0] |
| 133 | tasks = [(SampleInfo(0, 0, 0, 0),)] |
| 134 | work_batch = TaskArgs.make_sample(SampleRange(0, 1, 0, 0)) |
| 135 | pool.schedule_batch(context_i=0, work_batch=work_batch) |
| 136 | batch = pool.receive_batch(context_i=0) |
| 137 | for task, sample in zip(tasks, batch): |
| 138 | np.testing.assert_array_equal(answer(pid, *task), sample) |
| 139 | |
| 140 | @params(*start_methods) |
| 141 | def test_pool_multi_task(self, start_method): |
nothing calls this directly
no test coverage detected