Skip to content

Commit

Permalink
The errors are not raised with multiple processes
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Dec 22, 2024
1 parent 481c9ea commit 5e32a34
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions tests/test_dependencies_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,26 @@ def test_many_to_one_plot(self):


class TestExecutorErrors(unittest.TestCase):
def test_block_allocation_false(self):
def test_block_allocation_false_one_worker(self):
with self.assertRaises(RuntimeError):
with Executor(max_cores=1, backend="local", block_allocation=False) as exe:
cloudpickle_register(ind=1)
_ = exe.submit(raise_error)

def test_block_allocation_true(self):
def test_block_allocation_true_one_worker(self):
with self.assertRaises(RuntimeError):
with Executor(max_cores=1, backend="local", block_allocation=True) as exe:
cloudpickle_register(ind=1)
_ = exe.submit(raise_error)

def test_block_allocation_false_two_workers(self):
with self.assertRaises(RuntimeError):
with Executor(max_cores=2, backend="local", block_allocation=False) as exe:
cloudpickle_register(ind=1)
_ = exe.submit(raise_error)

# def test_block_allocation_true_two_workers(self):
# with self.assertRaises(RuntimeError):
# with Executor(max_cores=2, backend="local", block_allocation=True) as exe:
# cloudpickle_register(ind=1)
# _ = exe.submit(raise_error)

0 comments on commit 5e32a34

Please sign in to comment.