Skip to content

Commit

Permalink
Cache fix test (#449)
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen authored Oct 27, 2024
1 parent 4ed66db commit 8d71222
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_cache_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@


try:
from executorlib.cache.shared import (
execute_task_in_file,
_check_task_output,
)
from executorlib.cache.backend import FutureItem
from executorlib.cache.backend import backend_execute_task_in_file
from executorlib.cache.shared import _check_task_output, FutureItem
from executorlib.standalone.hdf import dump
from executorlib.standalone.serialize import serialize_funct_h5

Expand All @@ -36,7 +33,7 @@ def test_execute_function_mixed(self):
)
file_name = os.path.join(cache_directory, task_key + ".h5in")
dump(file_name=file_name, data_dict=data_dict)
execute_task_in_file(file_name=file_name)
backend_execute_task_in_file(file_name=file_name)
future_obj = Future()
_check_task_output(
task_key=task_key, future_obj=future_obj, cache_directory=cache_directory
Expand All @@ -59,7 +56,7 @@ def test_execute_function_args(self):
)
file_name = os.path.join(cache_directory, task_key + ".h5in")
dump(file_name=file_name, data_dict=data_dict)
execute_task_in_file(file_name=file_name)
backend_execute_task_in_file(file_name=file_name)
future_obj = Future()
_check_task_output(
task_key=task_key, future_obj=future_obj, cache_directory=cache_directory
Expand All @@ -82,7 +79,7 @@ def test_execute_function_kwargs(self):
)
file_name = os.path.join(cache_directory, task_key + ".h5in")
dump(file_name=file_name, data_dict=data_dict)
execute_task_in_file(file_name=file_name)
backend_execute_task_in_file(file_name=file_name)
future_obj = Future()
_check_task_output(
task_key=task_key, future_obj=future_obj, cache_directory=cache_directory
Expand Down

0 comments on commit 8d71222

Please sign in to comment.