Skip to content

Commit

Permalink
Add test for error
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Nov 11, 2024
1 parent 0c2548c commit b156e1c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_local_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,3 +504,21 @@ def test_execute_task_cache(self):
)
self.assertEqual(f.result(), 1)
q.join()

@unittest.skipIf(
skip_h5py_test, "h5py is not installed, so the h5py tests are skipped."
)
def test_execute_task_cache_failed_no_argument(self):
f = Future()
q = Queue()
q.put({"fn": calc_array, "args": (), "kwargs": {}, "future": f})
cloudpickle_register(ind=1)
with self.assertRaises(TypeError):
execute_parallel_tasks(
future_queue=q,
cores=1,
openmpi_oversubscribe=False,
spawner=MpiExecSpawner,
cache_directory="./cache",
)
q.join()

0 comments on commit b156e1c

Please sign in to comment.